delete_if_cache_directory: Delete a cache or temp directory
Description
For safety, path is only deleted if it is a sub-directory of a temporary
directory or user cache. Since this function relies on tools::R_user_dir(),
it early returns FALSE on R < 4.0.0.
Usage
delete_if_cache_directory(path)
Value
TRUE if anything was deleted, FALSE otherwise.
Arguments
- path
Absolute path to a directory to delete.