R/check_overwrite.R

Defines functions check_overwrite

check_overwrite <- function(file, overwrite) {
  if (file.exists(file) && !isTRUE(overwrite)) {
    stop(paste0(c("File", paste0("'", file, "'"), "already exists.",
                  "Specify 'overwrite = TRUE' if you want to overwrite it."),
                collapse = " "))
  }
}

Try the cmsafops package in your browser

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

cmsafops documentation built on Sept. 18, 2023, 5:16 p.m.