tar_cas_e: Existence check in local CAS.

View source: R/tar_repository_cas_local.R

tar_cas_eR Documentation

Existence check in local CAS.

Description

For internal use only.

Usage

tar_cas_e(cas, key)

Arguments

cas

File path to the CAS repository. NULL to default to file.path(tar_config_get("store"), "cas") (usually "_targets/cas/").

key

Key of the object in the CAS system.

Details

The short function name helps reduce the size of the tar_repository_cas() format string and save space in the metadata.

tar_cas_e() uses an in-memory cache in a package internal environment to maintain a list of keys that exists. This avoids expensive one-time lookups to the file system during tar_make().

Value

TRUE if the key exists in the CAS system, FALSE otherwise.


targets documentation built on Oct. 3, 2024, 1:11 a.m.