version_locker: Version locker contents

View source: R/locker.R

version_lockerR Documentation

Version locker contents

Description

Version locker contents

Usage

version_locker(where, version = "save", overwrite = FALSE, noreset = FALSE)

Arguments

where

The locker location.

version

A tag to be appended to where for creating a backup of the locker contents.

overwrite

If TRUE, the new location will be removed with unlink() if it exists.

noreset

If TRUE, noreset_locker() is called on the new version.

Value

A logical value indicating whether or not all files were successfully copied to the backup, invisibly.

See Also

reset_locker(), noreset_locker(), setup_locker()

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)

list.files(locker, all.files = TRUE)

y <- version_locker(locker, version = "y")

y

list.files(y, all.files = TRUE)


mrgsim.parallel documentation built on March 18, 2022, 7:52 p.m.