dirs.create: Flexibly Create Multiple Directories

Description Usage Arguments Value Examples

Description

Creates multiple directories at once by running dir.create over multiple paths through mapply.

Usage

1
dirs.create(paths, showWarnings = TRUE, recursive = FALSE, mode = "0777")

Arguments

paths

character vector containing multiple path names. See dir.create.

showWarnings

logical: should the warnings on failure be shown? See dir.create.

recursive

logical: should elements of the path other than the last be created? If true, like the Unix command mkdir -p. See dir.create.

mode

The mode to be used on Unix-alikes: it will be coerced by as.octmode. For Sys.chmod it is recycled along paths. See dir.create.

Value

logical vector of results of dir.create on each of the paths (which name the vector). See dir.create.

Examples

1
2
3
4
5
6
7
8
 ## Not run: 

   paths <- normalized_file_path(".", c("folder1", "folder2"),
                                 mustWork = FALSE)
   dirs.create(paths)
 
 
## End(Not run)

weecology/directree documentation built on Dec. 23, 2021, 5:09 p.m.