createDirectoryAtPath:withIntermediateDirectories:attributes:error:
Creates a directory with given attributes at a specified path.
Parameters
-
path
-
The path at which to create the new directory. The directory to be created must not yet exist.
createIntermediates
-
If
YES, then the method will also create any necessary intermediate directories; ifNO, then the method fails if any parent of the directory to be created does not exist. In addition, if you passNOfor this parameter, the directory must not exist at the time this call is made.
attributes
-
The file attributes for the new directory. The attributes you can set are owner and group numbers, file permissions, and modification date. If you specify
nilfor attributes, the directory is created according to the umask of the process. The “Constants” section lists the global constants used as keys in the attributesdictionary. Some of the keys, such asNSFileHFSCreatorCodeandNSFileHFSTypeCode, do not apply to directories.
error
-
If an error occurs, upon return contains an
NSErrorobject that describes the problem. PassNULLif you do not want error information.
Return Value
YES if the operation was successful or already exists, otherwise NO.

499

被折叠的 条评论
为什么被折叠?



