Learn R Programming

CSHShydRology (version 1.4.2)

ch_clear_wd: Clear Working Directory

Description

Empties and removes a working directory.

Usage

ch_clear_wd(wd, do_check = TRUE)

Value

result

returns TRUE upon successful execution

Arguments

wd

working directory file path

do_check

If TRUE, the default, the user is asked to confirm the deletion of the working directory. If TRUE, the directory is deleted without confirmation.

Author

Dan Moore

Details

The data for raster layers read in as Whitebox files are held on disk rather than in memory

See Also

ch_create_wd to create working directory

Examples

Run this code
# \donttest{
# not tested as deleting all files in the directory cannot be tested in CRAN

# create an empty working directory
my_wd <- tempdir()
ch_create_wd(my_wd) # confirm creation

# clear the working directory
ch_clear_wd(my_wd)
# }

Run the code above in your browser using DataLab