manage_climcropr_cache: Manage locally cached climcropr files

Description Usage Arguments Details Functions Note Author(s) Examples

Description

The user is given an option when downloading the climcropr data to cache or not to cache the data for later use. If cache == TRUE, then the climcropr data files are saved in a directory in the users' home file space. These functions provide facilities for interacting and managing these files.

Usage

1
2
3
4
5
6
7

Arguments

files

Character. One or more complete file names with no file path

force

Logical. Should files be force deleted? Defaults to : TRUE

Details

climcropr_cache_delete only accepts one file name, while climcropr_cache_delete_all does not accept any names, but deletes all files. For deleting many specific files, use cache_delete in a lapply type call.

We files cache using user_cache_dir, find your cache folder by executing rappdirs::user_cache_dir("climcropr")

Functions

Note

These functions were adapted from rOpenSci's cc_cache.

Author(s)

Original: Scott Chamberlain, scott@ropensci.org, adapted for use in this package by Adam H Sparks, adamhsparks@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
# List files in cache
climcropr_cache_list()

# List info for single files
climcropr_cache_details(files = climcropr_cache_list()[1])
climcropr_cache_details(files = climcropr_cache_list()[2])

# List info for all files
climcropr_cache_details()

# Delete files by name in cache
climcropr_cache_delete(files = climcropr_cache_list()[1])

# Delete all files in cache
climcropr_cache_delete_all()

## End(Not run)

AndySouth/climcropr documentation built on May 20, 2019, 5:08 p.m.