dir_create: Creates a path

Description Usage Arguments Value See Also

Description

This function first checks if the path exists. If the path does not exist, it attempts to create the path using dir.create with different default values.

Usage

1
dir_create(path, showWarnings = FALSE, recursive = TRUE, mode = "0777")

Arguments

path

a character vector containing a single path name. Tilde expansion (see path.expand) is done.

showWarnings

logical; should the warnings on failure be shown?

recursive

logical. Should elements of the path other than the last be created? If true, like the Unix command mkdir -p.

mode

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

Value

The function returns invisible TRUE if the path exists or if the path could successfully (and recursively by default) be created. If the path does not exist and the path cannot be created it throws an error with a hopefully useful message.

See Also

dir.create


dschlaep/ecotoner documentation built on May 15, 2019, 2:57 p.m.