# FileSystemManager.rmdir(Object object)

Deletes a directory.

# Parameters

# Object object

Property Type Default Value Required Description Minimum Version
dirPath string Yes Path to the directory to be deleted
recursive boolean false No Indicates whether to recursively delete the directory. If the value is true, the directory and all subdirectories and files under the directory are deleted. 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} Directory does not exist
fail directory not empty Directory is not empty
fail permission denied, open ${dirPath} No write permission on the specified dirPath
点击咨询小助手