overwrite_check: Check if the outdir exists or not

View source: R/overwrite_check.r

overwrite_checkR Documentation

Check if the outdir exists or not

Description

If the overwrite is TRUE then the folder will be deleted, otherwise the folder will be created.

Usage

overwrite_check(outdir, overwrite)

Arguments

outdir

the output directory

overwrite

TRUE or FALSE if 'outdirā€œ exists and overwrite = FALSE then throw an error

Examples

tf = tempfile()
overwrite_check(tf, overwrite = FALSE)
overwrite_check(tf, overwrite = TRUE)

# clean up
fs::dir_delete(tf)

disk.frame documentation built on Aug. 24, 2023, 5:09 p.m.