Task

Delete a file called "input.txt" and delete a directory called "docs".

This should be done twice: once "here", i.e. in the current working directory and once in the filesystem root.




file.remove("input.txt")
file.remove("/input.txt")
 
# or
file.remove("input.txt", "/input.txt")
 
# or
unlink("input.txt"); unlink("/input.txt")
 
# directories needs the recursive flag
unlink("docs", recursive = TRUE)
unlink("/docs", recursive = TRUE)