FileProvider lets file provider extensions surface cloud and external storage content in the Files app and Finder. You register an NSFileProviderDomain and implement the NSFileProviderReplicatedExtension protocol to map your remote items, identified by NSFileProviderItemIdentifier and conforming to NSFileProviderItemProtocol, into the system file hierarchy. Enumeration types such as NSFileProviderEnumerator, NSFileProviderEnumerationObserver, and NSFileProviderChangeObserver, together with NSFileProviderSyncAnchor and NSFileProviderManager, let the system browse, page through, and sync changes to your content. Additional protocols including NSFileProviderThumbnailing, NSFileProviderServicing, NSFileProviderCustomAction, and NSFileProviderIncrementalContentFetching let you provide thumbnails, custom actions, and incremental content fetching for the items you manage on iOS, macOS, and visionOS.
Essentials 5
The core manager and domain types that register and coordinate a file provider extension with the system.
- ClNSFileProviderManagermacOS 11.0+The file provider manager allows you to communicate with the file provider
- ClNSFileProviderDomainmacOS 11.0+File provider domain.
- StNSFileProviderDomainIdentifiermacOS 11.0+A structure that uniquely identifies a file provider domain.
- ClNSFileProviderDomainVersionmacOS 11.3+File provider domain version.
- PrNSFileProviderDomainStatemacOS 11.3+A protocol that exposes the current state and metadata of a file provider domain.
Replicated Extension 4
The principal protocols an extension implements to map remote items into the system file hierarchy.
- PrNSFileProviderReplicatedExtensionmacOS 11.0+FileProvider extension for which the system replicates the content on disk.
- PrNSFileProviderIncrementalContentFetchingmacOS 11.0+Protocol to implement if the provider instance supports fetching incremental content changes.
- PrNSFileProviderPartialContentFetchingmacOS 12.3+A protocol that lets an extension fetch a byte range of an item's content on demand.
- PrNSFileProviderExternalVolumeHandlingmacOS 15.0+A protocol that lets an extension manage items backed by external storage volumes.
Items and Identity 7
Types that describe individual items, their identifiers, versions, and metadata fields.
- PrNSFileProviderItemProtocolmacOS 11.0+A protocol that describes a single item, exposing its identity, metadata, and capabilities.
- StNSFileProviderItemIdentifiermacOS 11.0+A structure that uniquely identifies an item within a file provider domain.
- ClNSFileProviderItemVersionmacOS 11.0+An object that captures the content and metadata versions of an item to detect changes.
- StNSFileProviderItemCapabilitiesmacOS 11.0+An option set that describes the operations the system may perform on an item.
- StNSFileProviderItemFieldsmacOS 11.0+NSFileProviderItemContents corresponds to the item's contents.
- StNSFileProviderFileSystemFlagsmacOS 11.0+An option set that describes file-system attributes such as hidden or read-only state.
- StNSFileProviderTypeAndCreatormacOS 12.0+A structure that holds the legacy HFS type and creator codes for an item.
Enumeration and Syncing 7
Protocols and types that browse, page through, and synchronize changes to your content.
- PrNSFileProviderEnumeratingmacOS 11.0+A protocol that vends enumerators for the containers your extension exposes.
- PrNSFileProviderEnumeratormacOS 11.0+A protocol that enumerates the items and changes within a container of your file provider.
- PrNSFileProviderEnumerationObservermacOS 11.0+A protocol an extension calls to deliver enumerated items to the system in pages.
- PrNSFileProviderChangeObservermacOS 11.0+A protocol an extension calls to report incremental item updates and deletions to the system.
- PrNSFileProviderPendingSetEnumeratormacOS 11.3+A protocol that enumerates the set of items currently pending synchronization.
- StNSFileProviderSyncAnchormacOS 11.0+A user-defined chunk of data that defines a starting point to enumerate changes
- StNSFileProviderPagemacOS 11.0+A user- or system-defined chunk of data that defines a page to continue the
Search 5
Protocols and types that enumerate and return results for file searches within your domain.
- PrNSFileProviderSearchingmacOS 26.0+A protocol that lets an extension support searching the items it manages.
- PrNSFileProviderSearchEnumeratormacOS 26.0+A protocol that enumerates items matching a search query within your domain.
- PrNSFileProviderSearchEnumerationObservermacOS 26.0+A protocol an extension calls to deliver search results to the system in pages.
- PrNSFileProviderSearchResultmacOS 26.0+A protocol that describes a single result returned for a file provider search.
- ClNSFileProviderStringSearchRequestmacOS 26.0+An object that describes a text-based search query the system asks your extension to satisfy.
Item Operations 6
Options that configure how the system creates, modifies, deletes, and fetches the contents of items.
- StNSFileProviderCreateItemOptionsmacOS 11.0+Options passed on item creation.
- StNSFileProviderModifyItemOptionsmacOS 11.0+Options for modifying items.
- StNSFileProviderDeleteItemOptionsmacOS 11.0+Options passed on item deletion.
- StNSFileProviderFetchContentsOptionsmacOS 12.3+Used by the system to express options and constraints to the provider in fetchPartialContentsForItemWithIdentifier.
- StNSFileProviderMaterializationFlagsmacOS 12.3+NSFileProviderMaterializationFlags are used to inform the system about specific conditions
- EnNSFileProviderContentPolicymacOS 13.0+Constants that specify how an extension's content is materialized and retained on disk.
Extension Services 8
Protocols that add thumbnails, custom actions, services, and decorations to the items you manage.
- PrNSFileProviderThumbnailingmacOS 11.0+Protocol to implement if the provider supports fetching thumbnails for its items.
- PrNSFileProviderServicingmacOS 11.0+A protocol that lets an extension expose custom services the host app can connect to.
- PrNSFileProviderServiceSourcemacOS 11.0+A protocol that vends a named service endpoint host apps can connect to.
- PrNSFileProviderCustomActionmacOS 11.0+A protocol that lets an extension define custom actions users can invoke on items.
- StNSFileProviderExtensionActionIdentifiermacOS 11.0+A structure that uniquely identifies a custom action declared by a file provider extension.
- PrNSFileProviderItemDecoratingmacOS 11.0+Decorations are defined in the extension's Info.plist by adding a
- StNSFileProviderItemDecorationIdentifiermacOS 11.0+A structure that uniquely identifies a visual decoration applied to items.
- PrNSFileProviderUserInteractionSuppressingmacOS 12.0+Protocol to implement for managing UserInteraction alerts.
Known Folders 3
Types that identify and support system known-folder locations such as Desktop and Documents.
- PrNSFileProviderKnownFolderSupportingmacOS 15.0+A protocol that lets an extension declare and manage support for system known folders.
- StNSFileProviderKnownFoldersmacOS 15.0+Specifying a list of known folders.
- ClNSFileProviderKnownFolderLocationsmacOS 15.0+Specify the locations at which known folders should be synced in the replicated tree.
Requests and User Info 2
Types that carry contextual request information and supplementary user-facing data.
- ClNSFileProviderRequestmacOS 11.0+An object that carries contextual information about the system request prompting an extension operation.
- StNSFileProviderUserInfoKeymacOS 26.0+A structure that defines keys for supplementary user-facing information about an item.
Testing 11
Protocols and types used to simulate and verify file provider operations during development.
- PrNSFileProviderTestingOperationmacOS 11.3+An operation that can scheduled.
- PrNSFileProviderTestingIngestionmacOS 11.3+This operation causes the system to ingest a change.
- PrNSFileProviderTestingLookupmacOS 11.3+This operation causes the system to lookup an item.
- PrNSFileProviderTestingCreationmacOS 11.3+This operation causes the system to propagate a creation of an item from a source side to a target side.
- PrNSFileProviderTestingModificationmacOS 11.3+This operation causes the system to propagate a modification of an existing item from a source side to a target side.
- PrNSFileProviderTestingDeletionmacOS 11.3+This operation causes the system to propagate a deletion from a source side to a target side.
- PrNSFileProviderTestingContentFetchmacOS 11.3+This operation causes the system to fetch the content of an item.
- PrNSFileProviderTestingChildrenEnumerationmacOS 11.3+This operation causes the system to list the children of an item
- PrNSFileProviderTestingCollisionResolutionmacOS 11.3+This operation causes the system to resolve a collision by rename a colliding item.
- EnNSFileProviderTestingOperationTypemacOS 11.3+Type of the operation
- EnNSFileProviderTestingOperationSidemacOS 11.3+Side affected by the operation.
Errors and Diagnostics 2
Error types and reasons reported when operations or volumes can't be handled.
- StNSFileProviderErrormacOS 11.0+A structure that describes errors reported by a file provider extension or the system.
- StNSFileProviderVolumeUnsupportedReasonmacOS 15.0+A structure that describes why an external volume can't be supported by the provider.
Type Aliases 1
- TyNSFileProviderItem