R/ensure_exists.R

Defines functions ensure.exists

Documented in ensure.exists

#' Download a file if it does not exist
#'
#' @param path The destination path on disk
#' @param url The source URL
#' @export
ensure.exists = function(path, url) {
  if (!file.exists(path)) {
    download.file(url, path)
  }
}
kdmurray91/kdmRutil documentation built on May 17, 2019, 7:29 p.m.