Instance Property


The date and time the document file was last modified.


var fileModificationDate: Date? { get set }


The modification date is updated by the open(completionHandler:), save(to:for:completionHandler:), and revert(toContentsOf:completionHandler:) methods. Its value is nil if none of these methods has completed successfully at least once. If you override any of these methods, you should be sure to set this property in your implementation.

UIKit sets this property before it calls the completion handlers of the open(completionHandler:), save(to:for:completionHandler:), and revert(toContentsOf:completionHandler:). If, outside of these methods or their completion handlers, you want to wait for any pending file operations to complete before you access this property, you can call performAsynchronousFileAccess(_:) and access the property value in the block parameter.

See Also

Accessing Document Attributes

var fileURL: URL

The file URL with which the document was initialized.

var localizedName: String

The localized name of the document.

var fileType: String?

The file type of the document.

var documentState: UIDocument.State

Returns the current state of the document.

var progress: Progress?

The upload or download progress of a document.