This helper validates that a given directory exists and that the current R process has permission to create and delete a temporary file in it. It is intended for use before writing output files.
Value
Returns TRUE invisibly when the directory exists and is writable.
The function otherwise throws an error describing the problem:
if the directory does not exist, an error stating that it does not exist;
if the directory is not writable, an error stating that it is not writable.
See also
Other preflight:
check_raster_uniformity(),
check_zonation_executable()
Examples
if (FALSE) { # \dontrun{
check_dir_writable(tempdir())
} # }
