Skip to content

FileSystemManager.rmdirSync ​

JS
    FileSystemManager.rmdirSync(string dirPath, boolean recursive)

Remove a directory

The synchronous version of FileSystemManager.rmdir

Parameters

  • string dirPath: Path of the directory to remove

  • string newPath: Whether to remove the directory recursively. If true, removes the directory along with all its subdirectories and files

Parameters of the captured exception

  • string error: Returns the error message; see the table below for valid values

Valid values of error:

Error messageDescription
no such file or directoryThe directory does not exist
directory not emptyThe directory is not empty