Skip to contents

Manage cached files from the censobr package

Usage

censobr_cache(list_files = TRUE, print_tree = FALSE, delete_file = NULL)

Arguments

list_files

Logical. Whether to print a message with the address of all censobr data sets cached locally. Defaults to TRUE.

print_tree

Logical. Whether the cache files should be printed in a tree-like format. This parameter only works if list_files = TRUE. Defaults to FALSE.

delete_file

String. The file name (basename) of a censobr data set cached locally that should be deleted. Defaults to NULL, so that no file is deleted. If delete_file = "all", then the cache directory all of the cached files are deleted.

Value

A message indicating which file exist and/or which ones have been deleted from local cache directory.

See also

Examples

# list all files cached
censobr_cache(list_files = TRUE)
#>  Cache directory is currently empty.
#> character(0)

# delete particular file
censobr_cache(delete_file = '2010_deaths')
#>  Cache directory is currently empty.
#> character(0)