Instance Method


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


- (NSDictionary<NSFileAttributeKey, id> *)attributesOfFileSystemForPath:(NSString *)path error:(NSError * _Nullable *)error;



Any pathname within the mounted file system.


On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.

Return Value

An NSDictionary object that describes the attributes of the mounted file system on which path resides, or nil if an error occurs. 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

- componentsToDisplayForPath:

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

- displayNameAtPath:

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

- attributesOfItemAtPath:error:

Returns the attributes of the item at a given path.

- setAttributes:ofItemAtPath:error:

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