Protocol

NSFileProviderItemProtocol

A protocol that defines the properties of an item managed by the File Provider extension.

Declaration

protocol NSFileProviderItemProtocol

Overview

Most of these properties are optional. A File Provider extension doesn't need to implement all properties for all items.

Topics

Providing Required Properties

var itemIdentifier: NSFileProviderItemIdentifier

The item's persistent identifier.

Required.

var filename: String

The item's filename.

Required.

var typeIdentifier: String

The item's uniform type identifiers.

Required.

Managing Content

var childItemCount: NSNumber?

The number of items contained by this item.

var documentSize: NSNumber?

The document's size, in bytes.

Specifying Content Location

var parentItemIdentifier: NSFileProviderItemIdentifier

The persistent identifier of the item's parent folder.

Required.

var isTrashed: Bool

A Boolean value that indicates whether an item is in the trash.

Tracking Usage

var contentModificationDate: Date?

The date the item was last modified.

var creationDate: Date?

The date the item was created.

var lastUsedDate: Date?

The date the item was last used.

Tracking Versions

var versionIdentifier: Data?

A data value used to determine when the item changes.

Deprecated
var isMostRecentVersionDownloaded: Bool

A Boolean value that indicates whether the item is the most recent version downloaded from the server.

Monitoring File Transfers

var isUploading: Bool

A Boolean value that indicates whether the item is currently uploading to your remote server.

var isUploaded: Bool

A Boolean value that indicates whether the item has been uploaded to your remote server.

var uploadingError: Error?

An error that occurred while uploading to your remote server.

var isDownloading: Bool

A Boolean value that indicates whether the item is currently downloading from your remote server.

var isDownloaded: Bool

A Boolean value that indicates whether the item has been downloaded from your remote server.

var downloadingError: Error?

An error that occurred while downloading the item.

Sharing

var isShared: Bool

A Boolean value that indicates whether the item is shared with other users.

var isSharedByCurrentUser: Bool

A Boolean value that indicates whether the item was shared by the current user.

Managing Metadata

var tagData: Data?

An abstract data blob representing the tags associated with the item.

var favoriteRank: NSNumber?

A 64-bit, unsigned integer indicating the order of the favorite item in the Favorites list.

let NSFileProviderFavoriteRankUnranked: UInt64

A value that indicates that the item is not ranked.

var userInfo: [AnyHashable : Any]?

A property list that contains additional data about the item.

Relationships

Inherits From

See Also

Provided Items

typealias NSFileProviderItem

An item managed by the File Provider extension.

struct NSFileProviderItemIdentifier

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

struct NSFileProviderItemCapabilities

An item's capabilities, which define the actions that the user can perform in the document browser.