Version locker contents
Arguments
- where
The locker location.
- version
A tag to be appended to
wherefor creating a backup of the locker contents.- overwrite
If
TRUE, the new location will be removed withunlink()if it exists.- noreset
If
TRUE,config_locker()is called on the new version to mark the spacenoreset.
Value
A logical value indicating whether or not all files were successfully copied to the backup, invisibly.
Examples
locker <- file.path(tempdir(), "version-locker-example")
if(dir.exists(locker)) unlink(locker, recursive = TRUE)
x <- new_stream(1, locker = locker)
cat("test", file = file.path(locker, "1-1"))
dir.exists(locker)
#> [1] TRUE
list.files(locker, all.files = TRUE)
#> [1] "." ".." ".paquet-locker-dir"
#> [4] "1-1"
y <- version_locker(locker, version = "y")
y
#> [1] "/var/folders/5w/2ky5lwcj1zq7kyk4c3zg3zpw0000gp/T//Rtmpx1IZit/version-locker-example-y"
list.files(y, all.files = TRUE)
#> [1] "." ".." ".paquet-locker-dir"
#> [4] "1-1"