Returns a dictionary that describes the POSIX attributes of the file specified at a given.
- iOS 2.0–2.0Deprecated
- macOS 10.0–10.5Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- tvOS 9.0–9.0Deprecated
- watchOS 2.0–2.0Deprecated
A file path.
pathis not a symbolic link, this parameter has no effect. If
pathis a symbolic link, then:
truethe attributes of the linked-to file are returned, or if the link points to a nonexistent file the method returns
false, the attributes of the symbolic link are returned.
NSDictionary object that describes the POSIX attributes of the file specified at
path. The keys in the dictionary are described in File Attribute Keys. If there is no item at
This code example gets several attributes of a file and logs them.
As a convenience,
NSDictionary provides a set of methods (declared as a category in
NSFile) for quickly and efficiently obtaining attribute information from the returned dictionary:
file. For example, you could rewrite the file modification statement in the code example above as:
Because this method does not return error information, it has been deprecated as of OS X v10.5. Use