Contents

enumerator(for:)

Returns an enumerator for the specified item.

Declaration

func enumerator(for containerItemIdentifier: NSFileProviderItemIdentifier) throws -> any NSFileProviderEnumerator

Parameters

  • containerItemIdentifier:

    The persistent identifier for a document or folder.

Mentioned in

Return Value

An enumerator for the specified document or folder, or nil in Objective-C if an error has occurred.

Discussion

Your File Provider extension must define one or more classes that adopt the NSFileProviderEnumerator protocol. Instances of these classes must be able to enumerate both the contents of the specified item and any changes to the content.

Override this method to return an instance of your custom NSFileProviderEnumerator class for the specified item (either a document or a folder). For more information, see Content and Change Tracking.

See Also

Working with items and persistent identifiers