revert(toContentsOf:ofType:)
Discards all unsaved document modifications and replaces the document’s contents by reading a file or file package located by a URL of a specified type.
Declaration
func revert(toContentsOf url: URL, ofType typeName: String) throwsParameters
- url:
The location from which the document contents are read.
- typeName:
The string that identifies the document type.