documentIdentifier
A value that the kernel assigns to identify a document.
Declaration
var documentIdentifier: Int? { get }Discussion
The kernel uses a document identifier, which can be either a file or a directory, to identify the document regardless of where it moves on a volume.
The document identifier survives safe-save operation, and is sticky to the path the kernel assigns. replaceItem(at:withItemAt:backupItemName:options:resultingItemURL:) is the preferred safe-save API. The document identifier is persistent across system restarts, and doesn’t transfer when you copy the file. Document identifiers are only unique within a single volume. Not all volumes support this property.