R6 Class representing a configuration object
R6 Class representing a configuration object
The special sublist directories is structured to contain three items for each
directory name:
versioned: a T/F value specifying whether the directory is versioned
path: the full path to the top level of that directory.
files: A named list referencing file paths within that directory.
If the directory is versioned, a version must be set in the versions sublist of the
config list. versions is itself a named list where each key corresponds to a
versioned folder in directories and the value gives the particular folder version
(for example, a timestamp) that corresponds to the particular run.
config_listThe list representation of the Config object
get()Get a subset of the config_list
get_dir_path()Construct a directory path from the config object
dir_nameDirectory name
custom_version(character, default NULL) A custom version that will be
applied to this folder, rather than pulling from config_list$versions[[dir]].
Only applies to versioned folders.
fail_if_does_not_exist(logical, default FALSE) should this method return an error if the directory in question does not already exist?
get_file_path()Construct a file path from the config object
Config$get_file_path(
dir_name,
file_name,
custom_version = NULL,
fail_if_does_not_exist = FALSE
)dir_nameDirectory name
file_nameFile name within that directory
custom_version(character, default NULL) A custom version that will be
applied to this folder, rather than pulling from config_list$versions[[dir]].
Only applies to versioned folders.
fail_if_does_not_exist(logical, default FALSE) should this method return an error if the directory in question does not already exist?
read()dir_nameDirectory name
file_nameFile name within that directory
...Optional file reading arguments to pass to autoread()
custom_version(character, default NULL) A custom version that will be
applied to this folder, rather than pulling from config_list$versions[[dir]].
Only applies to versioned folders. If passed, this argument must always be
explicitly named.
The object loaded by autoread()
Write an object to file based on the config
write()xObject to write
dir_nameDirectory name
file_nameFile name within that directory
...Optional file writing arguments to pass to autowrite()
custom_version(character, default NULL) A custom version that will be
applied to this folder, rather than pulling from config_list$versions[[dir]].
Only applies to versioned folders. If passed, this argument must always be
explicitly named.
write_self()dir_nameDirectory name
...Optional file writing arguments to pass to autowrite()
custom_version(character, default NULL) A custom version that will be
applied to this folder, rather than pulling from config_list$versions[[dir]].
Only applies to versioned folders. If passed, this argument must always be
explicitly named.