make_dirs {librarian}R Documentation

Build a path, creating subfolders if needed

Description

Whereas base::file.path() only concatenates strings to build a path, make_dirs() also makes sure those folders exist.

Usage

make_dirs(...)

Arguments

...

(Character) Arguments to send to file.path(). You can provide a complete path as a single string, or incrementally build a path with many strings.

Value

(Character) A file path. Automatically adds trailing slashes if required.

Authors

Source

Examples

## Not run: 
make_dirs(tempdir(), "newfolder")

#> [1] "C:/Users/.../Temp/RtmpSwZA8X/newfolder"

## End(Not run)


[Package librarian version 1.8.1 Index]