Sets the attributes of the specified file or directory.
- iOS 2.0+
- macOS 10.5+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
A dictionary containing as keys the attributes to set for
pathand as values the corresponding value for the attribute. You can set the following attributes:
Owner Account ID
Owner Account Name
posix. You can change single attributes or any combination of attributes; you need not specify keys for all attributes.
The path of a file or directory.
true if all changes succeed. If any change fails, returns
false, but it is undefined whether any changes actually occurred.
As in the POSIX standard, the app either must own the file or directory or must be running as superuser for attribute changes to take effect. The method attempts to make all changes specified in attributes and ignores any rejection of an attempted modification. If the last component of the path is a symbolic link it is traversed.