Retrieve the config file path
Usage
get_user_cfg_path(cfg_dir = NULL, cfg_name = NULL)
Arguments
- cfg_dir
A character string specifying the config directory, or NULL
for the default. Default: An OS-specific path for user configuration files
in the user's home directory.
- cfg_name
A character string specifying the config file name, or NULL
for the default. Default: 'config.yml'
Value
A character string: the path to the config file, constructed from
cfg_dir
and cfg_name
or defaults if these are not suplied.
Examples
get_user_cfg_path()
#> [1] "/home/runner/.config/R-dimex/config.yml"
get_user_cfg_path(file.path("conf"), "configuration.yml")
#> [1] "conf/configuration.yml"