make_dirs: Build a path, creating subfolders if needed

Description Usage Arguments Value Authors Source Examples

View source: R/internal_functions.R

Description

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

Usage

1

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

1
2
3
4
5
6
## Not run: 
make_dirs(tempdir(), "newfolder")

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

## End(Not run)

librarian documentation built on July 12, 2021, 5:07 p.m.