Removes a directory, and if requested, also its contents.
# S3 method for default
removeDirectory(path, recursive=FALSE, mustExist=TRUE, ...)
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.
Henrik Bengtsson
Internally unlink
() is used.