stringWithContentsOfURL$1 static method
stringWithContentsOfURL:usedEncoding:error:
Implementation
static NSString? stringWithContentsOfURL$1(
NSURL url, {
required ffi.Pointer<ffi.UnsignedLong> usedEncoding,
}) {
final $err = pkg_ffi.calloc<ffi.Pointer<objc.ObjCObjectImpl>>();
try {
final $ret = _objc_msgSend_1alewu7(
_class_NSString,
_sel_stringWithContentsOfURL_usedEncoding_error_,
url.ref.pointer,
usedEncoding,
$err,
);
objc.NSErrorException.checkErrorPointer($err.value);
return $ret.address == 0
? null
: NSString.fromPointer($ret, retain: true, release: true);
} finally {
pkg_ffi.calloc.free($err);
}
}