initDir: Initialize directory

View source: R/initDir.R

initDirR Documentation

Initialize directory

Description

Checks and creates a directory recursively automatically.

Usage

initDir(dir)

Arguments

dir

character. Directory path(s).

Details

Useful for setting up functions that require writes to a user-specified directory.

Value

character. Directory path(s).

Note

Updated 2023-05-16.

Examples

dir <- file.path(tempdir2(), c("aaa", "bbb"))
dir.exists(dir)
dir <- initDir(dir)
dir.exists(dir)
print(dir)
unlink2(dir)

acidgenomics/acidbase documentation built on Jan. 26, 2024, 4:26 p.m.