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 March 31, 2022, 11:20 p.m.