The path is computed based on inputs and settings; it may or may not exist.
Arguments
- ...
Passed to
cas_get_options()
.- level
Defaults to "website". Valid values are "website", "project", and "base".
- custom_path
Defaults to NULL. If given, all other parameters and settings are ignored, and this value is returned.
Examples
cas_set_options(
base_folder = fs::path(tempdir(), "R", "castarter_data"),
db_folder = fs::path(tempdir(), "R", "castarter_data"),
project = "example_project",
website = "example_website"
)
cas_get_base_folder()
#> /tmp/RtmpSOhy4K/R/castarter_data/example_project/example_website
cas_get_base_folder(level = "website")
#> /tmp/RtmpSOhy4K/R/castarter_data/example_project/example_website
cas_get_base_folder(level = "project")
#> /tmp/RtmpSOhy4K/R/castarter_data/example_project
cas_get_base_folder(level = "base")
#> /tmp/RtmpSOhy4K/R/castarter_data
cas_get_base_folder(custom_path = fs::path(tempdir(), "custom_path"))
#> /tmp/RtmpSOhy4K/custom_path