attributesOfFileSystemForPath method

NSDictionary? attributesOfFileSystemForPath(
  1. NSString path
)

attributesOfFileSystemForPath:error:

Implementation

objc.NSDictionary? attributesOfFileSystemForPath(objc.NSString path) {
  final _$$ref = object$.ref;
  final _$$ref$1 = path.ref;
  objc.checkOsVersionInternal(
    'NSFileManager.attributesOfFileSystemForPath:error:',
    iOS: (false, (2, 0, 0)),
    macOS: (false, (10, 5, 0)),
  );
  final $err = pkg_ffi.calloc<ffi.Pointer<objc.ObjCObjectImpl>>();
  try {
    final $ret = _objc_msgSend_1lhpu4m(
      _$$ref.pointer,
      _sel_attributesOfFileSystemForPath_error_,
      _$$ref$1.pointer,
      $err,
    );
    objc.NSErrorException.checkErrorPointer($err.value);
    return $ret.address == 0
        ? null
        : objc.NSDictionary.fromPointer($ret, retain: true, release: true);
  } finally {
    pkg_ffi.calloc.free($err);
  }
}