Instance Method

urlForItem(withPersistentIdentifier:)

Returns the URL for a given persistent identifier.

Declaration

func urlForItem(withPersistentIdentifier identifier: NSFileProviderItemIdentifier) -> URL?

Parameters

identifier

The persistent identifier for a shared document.

Return Value

The URL of a shared document.

Discussion

Override this method to provide the URL for the document with the given identifier. This method must be the inverse of persistentIdentifierForItem(at:), mapping from the persistent identifier, back to the URL.

This URL must be inside the directory referred to by the NSFileProviderManager object's documentStorageURL property.

See Also

Working with Items and Persistent Identifiers

func persistentIdentifierForItem(at: URL) -> NSFileProviderItemIdentifier?

Returns a unique identifier for the given URL.

Deprecated
func item(for: NSFileProviderItemIdentifier) -> NSFileProviderItem

Returns a description of the item associated with the persistent identifier.

struct NSFileProviderItemIdentifier

A unique identifier for an item managed by the File Provider extension.