Learn R Programming

filesstrings (version 1.1.0)

create_dirs: Create directories if they don't already exist.

Description

Given the names of (potential) directories, create the ones that do not already exist.

Usage

create_dirs(dirs)

Arguments

dirs

The name of the directories, specified via relative or absolute paths.

Value

Invisibly, a vector with a TRUE for each time a directory was actually created and a FALSE otherwise.

Examples

Run this code
# NOT RUN {
setwd(tempdir())
create_dirs(c("mydir", "yourdir"))
remove_dirs(c("mydir", "yourdir"))
# }

Run the code above in your browser using DataLab