TechnologiesData, Storage & Cloud

FileProvider

iOSmacOStvOSwatchOSvisionOS

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.

  • Cl
    NSFileProviderManagermacOS 11.0+
    The file provider manager allows you to communicate with the file provider
  • Cl
    NSFileProviderDomainmacOS 11.0+
    File provider domain.
  • St
    NSFileProviderDomainIdentifiermacOS 11.0+
    A structure that uniquely identifies a file provider domain.
  • Cl
    NSFileProviderDomainVersionmacOS 11.3+
    File provider domain version.
  • Pr
    NSFileProviderDomainStatemacOS 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.

  • Pr
    NSFileProviderReplicatedExtensionmacOS 11.0+
    FileProvider extension for which the system replicates the content on disk.
  • Pr
    NSFileProviderIncrementalContentFetchingmacOS 11.0+
    Protocol to implement if the provider instance supports fetching incremental content changes.
  • Pr
    NSFileProviderPartialContentFetchingmacOS 12.3+
    A protocol that lets an extension fetch a byte range of an item's content on demand.
  • Pr
    NSFileProviderExternalVolumeHandlingmacOS 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.

  • Pr
    NSFileProviderItemProtocolmacOS 11.0+
    A protocol that describes a single item, exposing its identity, metadata, and capabilities.
  • St
    NSFileProviderItemIdentifiermacOS 11.0+
    A structure that uniquely identifies an item within a file provider domain.
  • Cl
    NSFileProviderItemVersionmacOS 11.0+
    An object that captures the content and metadata versions of an item to detect changes.
  • St
    NSFileProviderItemCapabilitiesmacOS 11.0+
    An option set that describes the operations the system may perform on an item.
  • St
    NSFileProviderItemFieldsmacOS 11.0+
    NSFileProviderItemContents corresponds to the item's contents.
  • St
    NSFileProviderFileSystemFlagsmacOS 11.0+
    An option set that describes file-system attributes such as hidden or read-only state.
  • St
    NSFileProviderTypeAndCreatormacOS 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.

  • Pr
    NSFileProviderEnumeratingmacOS 11.0+
    A protocol that vends enumerators for the containers your extension exposes.
  • Pr
    NSFileProviderEnumeratormacOS 11.0+
    A protocol that enumerates the items and changes within a container of your file provider.
  • Pr
    NSFileProviderEnumerationObservermacOS 11.0+
    A protocol an extension calls to deliver enumerated items to the system in pages.
  • Pr
    NSFileProviderChangeObservermacOS 11.0+
    A protocol an extension calls to report incremental item updates and deletions to the system.
  • Pr
    NSFileProviderPendingSetEnumeratormacOS 11.3+
    A protocol that enumerates the set of items currently pending synchronization.
  • St
    NSFileProviderSyncAnchormacOS 11.0+
    A user-defined chunk of data that defines a starting point to enumerate changes
  • St
    NSFileProviderPagemacOS 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.

  • Pr
    NSFileProviderSearchingmacOS 26.0+
    A protocol that lets an extension support searching the items it manages.
  • Pr
    NSFileProviderSearchEnumeratormacOS 26.0+
    A protocol that enumerates items matching a search query within your domain.
  • Pr
    NSFileProviderSearchEnumerationObservermacOS 26.0+
    A protocol an extension calls to deliver search results to the system in pages.
  • Pr
    NSFileProviderSearchResultmacOS 26.0+
    A protocol that describes a single result returned for a file provider search.
  • Cl
    NSFileProviderStringSearchRequestmacOS 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.

  • St
    NSFileProviderCreateItemOptionsmacOS 11.0+
    Options passed on item creation.
  • St
    NSFileProviderModifyItemOptionsmacOS 11.0+
    Options for modifying items.
  • St
    NSFileProviderDeleteItemOptionsmacOS 11.0+
    Options passed on item deletion.
  • St
    NSFileProviderFetchContentsOptionsmacOS 12.3+
    Used by the system to express options and constraints to the provider in fetchPartialContentsForItemWithIdentifier.
  • St
    NSFileProviderMaterializationFlagsmacOS 12.3+
    NSFileProviderMaterializationFlags are used to inform the system about specific conditions
  • En
    NSFileProviderContentPolicymacOS 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.

  • Pr
    NSFileProviderThumbnailingmacOS 11.0+
    Protocol to implement if the provider supports fetching thumbnails for its items.
  • Pr
    NSFileProviderServicingmacOS 11.0+
    A protocol that lets an extension expose custom services the host app can connect to.
  • Pr
    NSFileProviderServiceSourcemacOS 11.0+
    A protocol that vends a named service endpoint host apps can connect to.
  • Pr
    NSFileProviderCustomActionmacOS 11.0+
    A protocol that lets an extension define custom actions users can invoke on items.
  • St
    NSFileProviderExtensionActionIdentifiermacOS 11.0+
    A structure that uniquely identifies a custom action declared by a file provider extension.
  • Pr
    NSFileProviderItemDecoratingmacOS 11.0+
    Decorations are defined in the extension's Info.plist by adding a
  • St
    NSFileProviderItemDecorationIdentifiermacOS 11.0+
    A structure that uniquely identifies a visual decoration applied to items.
  • Pr
    NSFileProviderUserInteractionSuppressingmacOS 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.

  • Pr
    NSFileProviderKnownFolderSupportingmacOS 15.0+
    A protocol that lets an extension declare and manage support for system known folders.
  • St
    NSFileProviderKnownFoldersmacOS 15.0+
    Specifying a list of known folders.
  • Cl
    NSFileProviderKnownFolderLocationsmacOS 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.

  • Cl
    NSFileProviderRequestmacOS 11.0+
    An object that carries contextual information about the system request prompting an extension operation.
  • St
    NSFileProviderUserInfoKeymacOS 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.

  • Pr
    NSFileProviderTestingOperationmacOS 11.3+
    An operation that can scheduled.
  • Pr
    NSFileProviderTestingIngestionmacOS 11.3+
    This operation causes the system to ingest a change.
  • Pr
    NSFileProviderTestingLookupmacOS 11.3+
    This operation causes the system to lookup an item.
  • Pr
    NSFileProviderTestingCreationmacOS 11.3+
    This operation causes the system to propagate a creation of an item from a source side to a target side.
  • Pr
    NSFileProviderTestingModificationmacOS 11.3+
    This operation causes the system to propagate a modification of an existing item from a source side to a target side.
  • Pr
    NSFileProviderTestingDeletionmacOS 11.3+
    This operation causes the system to propagate a deletion from a source side to a target side.
  • Pr
    NSFileProviderTestingContentFetchmacOS 11.3+
    This operation causes the system to fetch the content of an item.
  • Pr
    NSFileProviderTestingChildrenEnumerationmacOS 11.3+
    This operation causes the system to list the children of an item
  • Pr
    NSFileProviderTestingCollisionResolutionmacOS 11.3+
    This operation causes the system to resolve a collision by rename a colliding item.
  • En
    NSFileProviderTestingOperationTypemacOS 11.3+
    Type of the operation
  • En
    NSFileProviderTestingOperationSidemacOS 11.3+
    Side affected by the operation.

Errors and Diagnostics 2

Error types and reasons reported when operations or volumes can't be handled.

  • St
    NSFileProviderErrormacOS 11.0+
    A structure that describes errors reported by a file provider extension or the system.
  • St
    NSFileProviderVolumeUnsupportedReasonmacOS 15.0+
    A structure that describes why an external volume can't be supported by the provider.

Type Aliases 1

  • Ty
    NSFileProviderItem

Extends 2

NSNotificationNSError
← Data, Storage & Cloud