R/utils.R

Defines functions warn_if_not_dir_exists

warn_if_not_dir_exists <- function(x) {
  if (!fs::dir_exists(x)) {
    warn(
      glue(
        "This directory doesn't exist:
        {ui_path(x)}
        Do you need to create it?"
      )
    )
  }

  invisible(x)
}
2DegreesInvesting/r2dii.utils documentation built on Jan. 16, 2020, 11:21 p.m.