The NSMetadataItem class represents the metadata associated with a file, providing a simple interface to retrieve the available attribute names and values.


Creating a Metadata Item

init?(url: URL)

Initializes a metadata item with a given URL.

Getting Item Attributes

var attributes: [String]

An array containing the attribute keys for the metadata item’s values.

func value(forAttribute: String)

Returns the receiver’s metadata attribute name specified by a given key.

func values(forAttributes: [String])

Returns a dictionary containing the key-value pairs for the attribute names specified by a given array of keys.


Attribute Keys

Attribute keys that may be associated with an item.

Cloud Storage Keys

Attribute keys that describe cloud-related information about the item.


Inherits From

Conforms To