create_re_dir: Create temporary redirection directory

Description Usage Details Value Examples

View source: R/re_dir.R

Description

Create a temporary directory to where output files can be redirected for examination and later cleanup. Once the output files have been written to the redirection directory, apply any needed tests to them to examine their content. Thereafter, cleanup can be performed by deleting the directory and its content in one go, e.g. by using fs::dir_delete().

Usage

1

Details

You may wish to defer the cleanup to a cleanup handler such as on.exit() or withr::defer(). The local_re_dir() function does this for you.

Value

re_dir Newly created uniquely named temporary directory.

Examples

1
2
3
re_dir <- create_re_dir()
# Do something with the re_dir directory
fs::dir_delete(re_dir)

iiasa/testGAMS documentation built on Sept. 14, 2021, 1:04 p.m.