Creates a directory with the given attributes at the specified URL.
- iOS 5.0+
- macOS 10.7+
- tvOS 9.0+
- watchOS 2.0+
A file URL that specifies the directory to create. If you want to specify a relative path, you must set the current working directory before creating the corresponding
NSURLobject. This parameter must not be
The file attributes for the new directory. You can set the owner and group numbers, file permissions, and modification date. If you specify
nilfor this parameter, the directory is created according to the umask(2) macOS Developer Tools Manual Page of the process. The Constants section lists the global constants used as keys in the
attributesdictionary. Some of the keys, such as
NSFile, do not apply to directories.
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
nilfor this parameter if you do not want the error information.
If you specify
nil for the
attributes parameter, this method uses a default set of values for the owner, group, and permissions of any newly created directories in the path. Similarly, if you omit a specific attribute, the default value is used. The default values for newly created directories are as follows:
Permissions are set according to the umask of the current process. For more information, see umask.
The owner ID is set to the effective user ID of the process.
The group ID is set to that of the parent directory.
If you want to specify a relative path for url, you must set the current working directory before creating the corresponding