Skip to contents

The path is computed based on inputs and settings; it may or may not exist.

Usage

cas_get_base_folder(..., level = "website", custom_path = NULL)

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.

Value

Path to the folder well all project files are stored.

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