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)
list.files(locker, all.files = TRUE)
y <- version_locker(locker, version = "y")
y
list.files(y, all.files = TRUE)
Run the code above in your browser using DataLab