dir_create_pipe: Pipe-amenable directory creation

View source: R/utility_functions.R

dir_create_pipeR Documentation

Pipe-amenable directory creation

Description

This function is small wrapper on dir.create(), returning the path created. If the directory creation process was unsuccessful, a warning is emitted.

Usage

dir_create_pipe(path, showWarnings = TRUE, recursive = FALSE, mode = "0777")

Arguments

path

a character vector containing a single path name. Tilde expansion is done.

showWarnings

logical; should the warnings on failure be shown?

recursive

logical. Should elements of the path other than the last be created? If true, like the Unix command mkdir -p.

mode

the mode to be used on Unix-alikes. Default is "0777".

Value

The path argument.

Examples

## Not run: 
  td <- tempdir()
  dir_create_pipe(td, recursive = TRUE)
  unlink(td, force = TRUE, recursive = TRUE)

## End(Not run)

MatthewHeun/SEAPSUTWorkflow documentation built on April 22, 2022, 2:21 p.m.