The document identifier returned as an
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
The document identifier is a value assigned by the kernel to a file or directory. This value is used to identify the document regardless of where it is moved on a volume. The identifier persists across system restarts. It is not transferred when the file is copied, but it survives "safe save” operations. For example, it remains on the path to which it was assigned, even after calling the
replaceItem(at:withItemAt:backupItemName:options:resultingItemURL:) method. Document identifiers are only unique within a single volume. This property is not supported by all volumes.
Other Resource Keys
static let addedToDirectoryDateKey: URLResourceKey
The time at which the resource’s was created or renamed into or within its parent directory, returned as an
NSDate. Inconsistent behavior may be observed when this attribute is requested on hard-linked items. This property is not supported by all volumes. (read-only)
static let attributeModificationDateKey: URLResourceKey
The time at which the resource’s attributes were most recently modified, returned as an
NSDate object if the volume supports attribute modification dates, or
nil if attribute modification dates are unsupported (read-only).
static let isExecutableKey: URLResourceKey
Key for determining whether the current process (as determined by the EUID) can execute the resource (if it is a file) or search the resource (if it is a directory), returned as a Boolean
NSNumber object (read-only).
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.Learn more about using Apple's beta software