R/utils-path.R

Defines functions check_dir_exists dir_exists

dir_exists <- function(d) {
  de <- file.info(d)$isdir
  ifelse(is.na(de), FALSE, de)
}


check_dir_exists <- function(dir){
  if(!dir_exists(dir))
    stop(sprintf("The directory %s does not exist",dir))
}

Try the damr package in your browser

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

damr documentation built on Nov. 16, 2020, 9:06 a.m.