Instance Method

fileWrapperOfType:error:

Creates and returns a file wrapper that contains the contents of the document, formatted to the specified type.

Declaration

- (NSFileWrapper *)fileWrapperOfType:(NSString *)typeName error:(NSError * _Nullable *)outError;

Parameters

typeName

The string that identifies the document type.

outError

On return, if the file wrapper could not be created, a pointer to an error object that encapsulates the reason it could not be created.

Return Value

A file wrapper containing the document contents, or, if the file wrapper could not be created, nil.

Discussion

For backward binary compatibility with OS X v10.3 and earlier, if fileWrapperRepresentationOfType: is overridden, the default implementation of this method instead invokes [self fileWrapperRepresentationOfType:typeName].

See Also

Loading Document Data

- dataOfType:error:

Creates and returns a data object that contains the contents of the document, formatted to a specified type.

- readFromData:ofType:error:

Sets the contents of this document by reading from data of a specified type and returns YES if successful.

entireFileLoaded

A Boolean value indicating whether the document’s file is completely loaded into memory.