get_iobr_cache_dir: Get IOBR Cache Directory

View source: R/download_data.R

get_iobr_cache_dirR Documentation

Get IOBR Cache Directory

Description

Returns the current cache directory for IOBR downloaded data. To comply with CRAN policies, the default cache directory is a session-specific temporary directory. Users can opt-in to a persistent cache by setting 'options(IOBR.cache_dir = "your/path")' or using 'set_iobr_cache_dir()'.

The cache directory is determined in the following priority order: 1. Function argument 'cache_dir' (if provided) 2. Option 'IOBR.cache_dir' (if set via 'options()') 3. Default: A session-specific temporary directory ('file.path(tempdir(), "IOBR_cache")')

Usage

get_iobr_cache_dir(cache_dir = NULL)

Arguments

cache_dir

Optional character string to override the current setting.

Value

Character string with the cache directory path.

Examples

# Get current cache directory (defaults to tempdir)
get_iobr_cache_dir()

# Set custom cache directory via options (use tempdir() for examples)
options(IOBR.cache_dir = tempdir())
get_iobr_cache_dir()

IOBR documentation built on May 30, 2026, 5:07 p.m.