R/validate_access_folder_paths.R

Defines functions validate_access_folder_paths

validate_access_folder_paths <- function(remote_basepath,
                                         local_basepath = "_site",
                                         rel_path_base_to_parent_of_user_restricted_folder =
                                           file.path( "Reports",
                                                      "2023",
                                                      "Mesos"),
                                         warn = FALSE) {
  rel_path_base_to_parent_of_user_restricted_folder <- file.path(local_basepath, rel_path_base_to_parent_of_user_restricted_folder)
  warnabort_fn <- if(isTRUE(warn)) cli::cli_warn else cli::cli_abort
  for(path in c(remote_basepath, local_basepath, rel_path_base_to_parent_of_user_restricted_folder)) {
    if(!rlang::is_string(path)) {
      warnabort_fn("{.arg {path}} must be a string.")
    }
  }
}

Try the saros.base package in your browser

Any scripts or data that you put into this service are public.

saros.base documentation built on June 8, 2025, 10:03 a.m.