setup_locker {mrgsim.parallel} | R Documentation |
Set up a data storage locker
Description
A locker is a directory structure where an enclosing folder contains subfolders that in turn contain the results of different simulation runs. When the number of simulation result sets is known, a stream of file names is returned. This function is mainly called by other functions; an exported function and documentation is provided in order to better communicate how the locker works.
Usage
setup_locker(where, tag = locker_tag(where))
Arguments
where |
The directory that contains tagged directories of run results. |
tag |
The name of a folder under |
Details
where
must exist when setting up the locker. The directory tag
will be
created under where
and must not exist except if it had previously been
set up using setup_locker
. Existing tag
directories will have a
hidden file in them indicating that they are established simulation output
folders.
When recreating the tag
directory, it will be unlinked and created new.
To not try to set up a locker directory that already contains outputs that
need to be preserved. You can call noreset_locker()
on that directory
to prevent future resets.
Value
The locker location.
See Also
reset_locker()
, noreset_locker()
, version_locker()
Examples
x <- setup_locker(tempdir(), tag = "my-sims")
x