fileWrapper(ofType:)
Creates and returns a file wrapper that contains the contents of the document, formatted to the specified type.
Declaration
func fileWrapper(ofType typeName: String) throws -> FileWrapperParameters
- typeName:
The string that identifies the document type.
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
Writing the Document’s Content
canAsynchronouslyWrite(to:ofType:for:)unblockUserInteraction()write(to:ofType:)writeSafely(to:ofType:for:)data(ofType:)write(to:ofType:for:originalContentsURL:)save(to:ofType:for:delegate:didSave:contextInfo:)save(to:ofType:for:completionHandler:)fileAttributesToWrite(to:ofType:for:originalContentsURL:)NSDocument.SaveOperationType