# FileSystemManager.mkdir(Object object)

Creates a directory.

# Parameters

# Object object

Property Type Default Value Required Description Minimum Version
dirPath string Yes The path to the created directory
recursive boolean false No Indicates whether to create the directory after recursively creating the upper-layer directory. If the upper-layer directory already exists, do not create it. If dirPath is a/b/c/d and "recursive" is true, directory a will be created, and then directory b will be created under directory a, and so on, until directory d under directory a/b/c is created. 2.3.0
success function No The callback function for a successful API call
fail function No The callback function for a failed API call
complete function No The callback function used when the API call completed (always executed whether the call succeeds or fails)

# object.fail callback function

# Parameters
# Object res
Property Type Description
errMsg string Error message

Valid values of res.errMsg

Value Description Minimum Version
fail no such file or directory ${dirPath} The upper-layer directory does not exist
fail permission denied, open ${dirPath} No write permission on the specified filePath
fail file already exists ${dirPath} A file or directory with the same name already exists
点击咨询小助手