manage_cache: Manage locally cached CRU CL v. 2.0 files

manage_cacheR Documentation

Manage locally cached CRU CL v. 2.0 files

Description

Manage cached getCRUCLdata files with hoardr.

Details

The default cache directory is tools::R_user_dir(package = "getCRUCLdata"), 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 base::lapply type call.

Useful user functions

manage_cache$cache_path_get()

get cache path

manage_cache$cache_path_set()

set cache path

manage_cache$list()

returns a character vector of full path file names

manage_cache$files()

returns file objects with metadata

manage_cache$details()

returns files with details

manage_cache$delete()

delete specific files

manage_cache$delete_all()

delete all files, returns nothing

Author(s)

Adam H. Sparks, adamhsparks@gmail.com

Examples

## Not run: 

# list files in cache
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)

adamhsparks/getCRUCL2.0 documentation built on Dec. 21, 2024, 4:32 a.m.