read(from:ofType:)
Sets the contents of this document by reading from a file wrapper of a specified type.
Declaration
nonisolated func read(from fileWrapper: FileWrapper, ofType typeName: String) throwsParameters
- fileWrapper:
The file wrapper from which the document contents are read.
- typeName:
The string that identifies the document type.
Discussion
The default implementation of this method invokes [self readFromData:[fileWrapper regularFileContents] ofType:typeName error:outError].
For backward binary compatibility with OS X v10.3 and earlier, the default implementation of this method instead invokes [self loadFileWrapperRepresentation:fileWrapper ofType:typeName] if loadFileWrapperRepresentation:ofType: is overridden.