rhdx_cache: Caching HDX downloaded files

Description Usage Arguments Details Value Examples

Description

Manage cached HDX downloaded files

Usage

1
2
3
4
5
6
7
8
9

Arguments

path

Character directory to set

file

Character, the file to delete

Details

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

Value

the cache directory

the cache directory

list of files in the cache

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
rhdx_cache
## change the default cache directory
tmp <- tempdir()
rhdx_cache_set_dir(tmp)

## print current cache directory
rhdx_cache_get_dir()

## List available files in the current cache directory
rhdx_cache_list()

l <- rhdx_cache_list()[1] ## get the first file
rhdx_cache_delete(l) ## delete it

rhdx_cache_clear() ## delete all cached files

## End(Not run)

dickoa/rhdx documentation built on Oct. 13, 2021, 8:36 p.m.