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. 28, 2024, 2:59 a.m.