build_path builds the entire folder FilePath provided. If the FilePath does not exist, it builds it without error. It is effectively an extension to the base function dir.create.

build_path(FilePath, Silent = TRUE)

Arguments

FilePath

A character string with the target folder path. This can be a vector of multiple paths, e.g.: FilePath <- paste0( "C:/TestFolder/", c("Subfolder1","Subfolder2"))

Silent

True by default, if set to FALSE it shows the address of the folder just created. This is, however, saved if used as: Path <- build_path(FilePath), making the message largely redundant.

Value

Path address just built.

Examples

# NOT RUN {
PathLoc <- tempdir()
Path <- build_path(PathLoc)
Pathmultiplecreate <- build_path(file.path(PathLoc, c("XXX", "YYY")))
# }