add_dir: Make directory if needed

View source: R/filepaths.R

add_dirR Documentation

Make directory if needed

Description

Takes an input path (either the full path, including file extension, or just the folder path). Checks to see if the directory exists. If the directory does not exist, the function creates that directory. The function does nothing if the directory exits.

Usage

add_dir(path)

Arguments

path

(string) file path (or directory path)

Examples

## Not run: 
path <- "outputs/new_directory/stuff_for_today"
make_dir_if_needed(path)

## End(Not run)

baslat/sak documentation built on April 14, 2025, 4:14 p.m.