R/utils.R

Defines functions read_raw is_dir create_dir

create_dir <- function(path) {
  dir.create(path, showWarnings = FALSE, recursive = TRUE)
}

is_dir <- function(x) {
  isTRUE(file.info(x)$isdir)
}

read_raw <- function(path) {
  readBin(path, "raw", n = file.info(path)$size)
}

Try the secret package in your browser

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

secret documentation built on July 2, 2020, 1:49 a.m.