unlink {base} | R Documentation |
unlink
deletes the file(s) or directories specified by x
.
unlink(x, recursive = FALSE)
x |
a character vector with the names of the file(s) or directories to be deleted. Wildcards (normally ‘*’ and ‘?’) are allowed. |
recursive |
logical. Should directories be deleted recursively? |
If recursive = FALSE
directories are not deleted,
not even empty ones.
file.remove
can only remove files, but gives more
detailed error information.
Wildcard expansion is done by the internal code of
Sys.glob
.
Wildcards will only be expanded if the system supports it.
recursive = TRUE
is not supported on all platforms, and may be
ignored, with a warning.
0
for success, 1
for failure.
Not deleting a non-existent file is not a failure, nor is being unable
to delete a directory if recursive = FALSE
.
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.