Manage cached geoBoundaries downloaded files
gb_set_cache(path) gb_get_cache(create = FALSE) gb_clear_cache(force = FALSE) gb_list_cache(full_path = FALSE) gb_delete_from_cache(file)
| path | character; path of the directory to set |
|---|---|
| create | logical; if TRUE create missing cache |
| force | logical; force delete. default: |
| full_path | logical; if TRUE returns the full path of the file |
| file | Character, the file to delete |
the cache directory
list of files in the cache
The default cache directory is
~/.cache/R/gb_cache, but you can set
your own path using gb_set_cache(path)
This function will clear all cached files
if (FALSE) { gb_cache ## change the default cache directory tmp <- tempdir() gb_set_cache(tmp) ## print current cache directory gb_get_cache() ## List available files in the current cache directory gb_list_cache() l <- gb_list_cache()[1] ## get the first file gb_delete_from_cache(l) ## delete it gb_clear_cache() ## delete all cached files }