Instance Method

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) throws

Parameters

absoluteURL

The location from which the document contents are read.

typeName

The string that identifies the document type.

outError

On return, if the document could not be reverted, a pointer to an error object that encapsulates the reason it could not be reverted.

Return Value

true if the document could be reverted; otherwise, false.

Discussion