Back up and rename the file or directory
Examples
path <- tempfile()
file.create(path)
#> [1] TRUE
path2 <- backup_file(path, remove = TRUE)
file.exists(c(path, path2))
#> [1] FALSE TRUE
unlink(path2)
Back up and rename the file or directory
path <- tempfile()
file.create(path)
#> [1] TRUE
path2 <- backup_file(path, remove = TRUE)
file.exists(c(path, path2))
#> [1] FALSE TRUE
unlink(path2)