Removes a directory, and if requested, also its contents.
# S3 method for default
removeDirectory(path, recursive=FALSE, mustExist=TRUE, ...)
A character
string specifying the directory to be removed.
If TRUE
, and the directory does not exist,
an exception is thrown.
Not used.
Returns (invisibly) TRUE
, the directory was successfully removed,
otherwise FALSE
, unless an exception is thrown.
This function can also be used to remove symbolic links to directories
without removing the target.
Note that neither file.remove
() nor unlink
()
is capable of remove symbolic directory links on Windows.
Internally unlink
() is used.