Instance Method


Returns a dictionary that describes the attributes of the mounted file system on which a given path resides.


func attributesOfFileSystem(forPath path: String) throws -> [FileAttributeKey : Any]



Any pathname within the mounted file system.

Return Value

A dictionary object that describes the attributes of the mounted file system on which path resides. See File-System Attribute Keys for a description of the keys available in the dictionary.


This method does not traverse a terminal symbolic link.

See Also

Getting and Setting Attributes

func componentsToDisplay(forPath: String) -> [String]?

Returns an array of strings representing the user-visible components of a given path.

func displayName(atPath: String) -> String

Returns the display name of the file or directory at a specified path.

func attributesOfItem(atPath: String) -> [FileAttributeKey : Any]

Returns the attributes of the item at a given path.

func setAttributes([FileAttributeKey : Any], ofItemAtPath: String)

Sets the attributes of the specified file or directory.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software