cached_path: Cached object's path

Description Usage Arguments Details See Also Examples

View source: R/cached_path.R

Description

The path for a cached object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
cached_path(x)

## S3 method for class 'cached_path'
print(x, ...)

as_cached_path(x, cache = cache_path(), ext = cache_ext())

## Default S3 method:
as_cached_path(x, cache = cache_path(), ext = NULL)

## S3 method for class 'character'
as_cached_path(x, cache = cache_path(), ext = backends_exts())

## S3 method for class 'cached_file'
as_cached_path(x, cache = cache_path(), ext = NULL)

## S3 method for class 'cached_name'
as_cached_path(x, cache = cache_path(), ext = cache_ext())

Arguments

x

string or fs::path() object.

...

additional arguments

cache

string; location of the cache directory. (Default: cache_path())

ext

string; extension for the file. (Default: cache_ext() )

Details

A cached_path is a fs::path() object that points to an object in the cache, It is not the cache directory itself. Use cache_path() for getting and setting the location of the cache directory.

See Also

Examples

1
2
3
4
5
6
7
  cached_path("cache/iris.rds")
  cached_path( c("cache/iris.rds", "mtcars.rds") )

  as_cached_path(iris)
  cached_file('iris.rds') %>% as_cached_path()

  cached_name('iris') %>% as_cached_path()

decisionpatterns/cache documentation built on June 15, 2020, 9:35 p.m.