makeDocumentWithContentsOfFile method

ObjCObjectBase? makeDocumentWithContentsOfFile(
  1. NSString fileName, {
  2. required NSString ofType,
})

makeDocumentWithContentsOfFile:ofType:

Implementation

objc.ObjCObjectBase? makeDocumentWithContentsOfFile(
  objc.NSString fileName, {
  required objc.NSString ofType,
}) {
  objc.checkOsVersionInternal(
    'NSDocumentController.makeDocumentWithContentsOfFile:ofType:',
    iOS: (true, null),
    macOS: (false, (10, 0, 0)),
  );
  final _ret = _objc_msgSend_15qeuct(
    this.ref.pointer,
    _sel_makeDocumentWithContentsOfFile_ofType_,
    fileName.ref.pointer,
    ofType.ref.pointer,
  );
  return _ret.address == 0
      ? null
      : objc.ObjCObjectBase(_ret, retain: true, release: true);
}