NSFileProviderExtension
The principal class for the nonreplicated File Provider extension.
Declaration
class NSFileProviderExtensionOverview
To create a nonreplicated File Provider extension, start by creating a subclass of the NSFileProviderExtension class. When implementing your NSFileProviderExtension subclass, remember:
Override all of the extension’s methods (except the deprecated methods), even if your implementation is only an empty method.
Use your method implementations to provide access to the documents and folders managed by your file provider.
Don’t call
superin your method implementations.
Don’t use the NSFileProviderExtension class in macOS. Instead, create an NSObject subclass that adopts the NSFileProviderReplicatedExtension and NSFileProviderEnumerating protocols. For more information, see Replicated File Provider extension.
Topics
Working with items and persistent identifiers
persistentIdentifierForItem(at:)urlForItem(withPersistentIdentifier:)item(for:)enumerator(for:)NSFileProviderItemIdentifier
Managing shared files
itemChanged(at:)providePlaceholder(at:completionHandler:)startProvidingItem(at:completionHandler:)stopProvidingItem(at:)
Handling actions
Providing support for user-driven actionscreateDirectory(withName:inParentItemIdentifier:completionHandler:)deleteItem(withIdentifier:completionHandler:)importDocument(at:toParentItemIdentifier:completionHandler:)renameItem(withIdentifier:toName:completionHandler:)reparentItem(withIdentifier:toParentItemWithIdentifier:newName:completionHandler:)setFavoriteRank(_:forItemIdentifier:completionHandler:)setLastUsedDate(_:forItemIdentifier:completionHandler:)setTagData(_:forItemIdentifier:completionHandler:)trashItem(withIdentifier:completionHandler:)untrashItem(withIdentifier:toParentItemIdentifier:completionHandler:)