Reads a local file and writes it to the cache so that CI and Docker environments (which may lack the original files) can still run tests.
Examples
# The SQLite backend needs the optional 'RSQLite' package.
if (requireNamespace("RSQLite", quietly = TRUE)) {
tdir <- tempfile("morie-cache-")
dir.create(tdir)
f <- file.path(tdir, "demo.csv")
write.csv(data.frame(x = 1:3, y = 4:6), f, row.names = FALSE)
morie_cache_file(f, "demo", db_path = file.path(tdir, "cache.db"))
}
