Removes the specified directory in the local file system.
Note: This function employs the generator progress indicator to display which directory is currently being removed. Clicking the “Cancel” button during that will interrupt the function and stop the entire generator.
Parameter:
dir
The pathname of the directory to be removed.Note: A relative pathname will be interpreted against the current directory.
all
Specify whether to delete a non-empty directory.When
true
, the directory will be removed together with all files and subdirectories contained in it. Iffalse
the directory is removed only when it is empty.Note: When this parameter is not specified, its default value is assumed to be
true
.
Returns:
true
- the directory has been successfully removed;
false
- the specified directory cannot be removed (or does not exist).