Skip to contents

By default lockfiles are stored beneath the onetime base directory, in a directory named after the calling package. You can use a different subdirectory by setting path = onetime_dir("dirname") in calls to onetime functions.

Usage

onetime_dir(dir)

Arguments

dir

String. Name of a single directory.

Value

The path.

Details

onetime_dir() does not autocreate the directory (but it will get created during the call to onetime_do()).

Examples

onetime_dir("my-folder")
#> [1] "/home/runner/.config/onetime/onetime-lockfiles/my-folder"
oo <- options(onetime.dir = tempdir(check = TRUE))
onetime_dir("my-folder")
#> [1] "/tmp/RtmpPVFtQo/my-folder"
options(oo)