manage_cache: Manage locally cached bomrang files

Description Details Useful user functions Examples

Description

Manage cached bomrang satellite imagery files with hoardr.

Details

The default cache directory is
file.path(rappdirs::user_cache_dir(), "R/bomrang"), but you can set your own path using manage_cache$cache_path_set()

manage_cache$cache_delete only accepts one file name, while manage_cache$cache_delete_all does not accept any names, but deletes all files. For deleting many specific files, use
manage_cache$cache_delete in an lapply type call.

Useful user functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 

# list files in cache

imagery <- get_satellite_imagery(product_id = "IDE00425",
                                 scans = 1,
                                 cache = TRUE)

manage_cache$list()

# delete certain database files
manage_cache$delete("file path")
manage_cache$list()

# delete all files in cache
manage_cache$delete_all()
manage_cache$list()

# set a different cache path from the default
manage_cache$cache_path_set("~/tmp")

## End(Not run)

bomrang documentation built on March 29, 2021, 5:11 p.m.