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)

Arguments

path

character; path of the directory to set

create

logical; if TRUE create missing cache

force

logical; force delete. default: FALSE

full_path

logical; if TRUE returns the full path of the file

file

Character, the file to delete

Value

the cache directory

list of files in the cache

Details

The default cache directory is ~/.cache/R/gb_cache, but you can set your own path using gb_set_cache(path)

Note

This function will clear all cached files

Examples

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 }