qa_cache_dir: Get or set the directory used to cache Quantarctica data

View source: R/cache_dir.R

qa_cache_dirR Documentation

Get or set the directory used to cache Quantarctica data

Description

The cache directory is used to store data locally, so that they can be used offline later. If called with no arguments (i.e. qa_cache_dir()), this function returns the current cache directory. By default, this is a per-session temporary directory. Calling with a path argument will set the cache directory to that path.

Usage

qa_cache_dir(path, verbose = FALSE)

Arguments

path

string: (optional) Values can be "session" (a per-session temporary directory will be used, default), "persistent" (the directory returned by rappdirs::user_cache_dir will be used), or a string giving the path to the directory to use. An attempt will be made to create the cache directory if it does not exist

verbose

logical: show progress messages?

Value

The path to the cache directory

See Also

qa_get

Examples


## return the current cache directory
qa_cache_dir()

## set the cache directory to a location that persists across
##  user sessions
qa_cache_dir("persistent")

## switch to a per-session cache
qa_cache_dir("session")


SCAR-sandpit/quantarcticR documentation built on June 10, 2025, 5:12 a.m.