---
title: fileModificationDate
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uidocument/filemodificationdate
---

# fileModificationDate

The date and time your app last modified the document file.

## Declaration

```swift
var fileModificationDate: Date? { get set }
```

## Discussion

Discussion 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. important: This API has the potential of being misused to access device signals to try to identify the device or user, also known as fingerprinting. Regardless of whether a user gives your app permission to track, fingerprinting is not allowed. When you use this API in your app or third-party SDK (an SDK not provided by Apple), declare your usage and the reason for using the API in your app or third-party SDK’s PrivacyInfo.xcprivacy file. For more information, including the list of valid reasons for using the API, see Describing use of required reason API.

## See Also

### Accessing document attributes

- [fileURL](uikit/uidocument/fileurl.md)
- [localizedName](uikit/uidocument/localizedname.md)
- [fileType](uikit/uidocument/filetype.md)
- [documentState](uikit/uidocument/documentstate.md)
- [progress](uikit/uidocument/progress.md)
