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
- tvOS 9.0–9.0Deprecated
- watchOS 2.0–2.0Deprecated
path is not a symbolic link, this parameter has no effect. If
path is a symbolic link, then:
YES the attributes of the linked-to file are returned, or if the link points to a nonexistent file the method returns
NO, 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
NSFileManager.h) for quickly and efficiently obtaining attribute information from the returned dictionary:
fileType. For example, you could rewrite the file modification statement in the code example above as: