Use the shared backend through the public targets CAS interface
Source:R/cas.R
shared_repository.RdAction records and content objects remain distinct. This adapter supplies
upload/download/exists/list callbacks to targets::tar_repository_cas().
Native targets keys have their own namespace because they are not action keys
or tarshare bundle hashes. Neither upload nor download moves a caller's files.
Usage
shared_repository(cache, consistent = FALSE)
shared_cas_upload(key, path, cache)
shared_cas_download(key, path, cache)
shared_cas_exists(key, cache)
shared_cas_list(keys, cache)Arguments
- cache
A
shared_cache()configuration.- consistent
Whether the filesystem has strong read-after-write consistency.
- key
A native targets content key.
- path
Source for upload or destination for download, a file or directory.
- keys
A character vector of native targets content keys.
Value
shared_repository() returns a repository string for targets. Upload
and download act by side effect; exists returns a logical; list returns keys.
Details
Native objects are retained for their pipeline store until the owner
is explicitly released. Use shared_gc(), not the single-store native GC,
for this backend. Repository callbacks are public to survive targets' text
serialization without a closure or a dependency on targets internals.