cache_metadata: Cache Metadata

cache_metadataR Documentation

Cache Metadata

Description

Tools to access and handle cache metadata. These are advanced / under-the-hood tools which you almost certainly should not use for anything. ⁠[iarccrgtools::cache_clean_hash]⁠ and ⁠[iarccrgtools::cache_clean_all]⁠ may be the exceptions.

Usage

cache_metadata_file_name()

cache_metadata_file_path()

cache_metadata_read()

cache_metadata_write(metadata)

cache_metadata_append_or_replace(hash, working.dir, input.file.path)

cache_metadata_refresh()

cache_hash(df)

cache_clean_hash(hash)

cache_clean_all()

Arguments

metadata

⁠[data.frame]⁠ (no default)

Metadata.

hash

⁠[character]⁠ (no default)

Hash of an input dataset.

working.dir

⁠[character]⁠ (no default)

Path to directory to include in metadata.

input.file.path

⁠[character]⁠ (no default)

Path to input file (which must exist) to include in metadata.

df

⁠[data.frame]⁠ (no default) data.frame for which to compute hash.

Functions

⁠[iarccrgtools::cache_metadata_file_path]⁠ returns a string, the name of to the cache metadata file.

⁠[iarccrgtools::cache_metadata_file_path]⁠ returns a string, the path to the cache metadata.

⁠[iarccrgtools::cache_metadata_read]⁠ reads cache metadata from the path given by ⁠[iarccrgtools::cache_metadata_file_path]⁠. Returns a data.table with zero rows if no file found.

⁠[iarccrgtools::cache_metadata_write]⁠ writes metadata to the path given by ⁠[iarccrgtools::cache_metadata_file_path]⁠.

⁠[iarccrgtools::cache_metadata_append_or_replace]⁠ appends data to the cache metadata, or replaces data that already exists for the same input file path, if any.

⁠[iarccrgtools::cache_metadata_refresh]⁠ removes any non-existing directories from the cache metadata.

⁠[iarccrgtools::cache_hash]⁠ outputs a hash for the input data.frame.

⁠[iarccrgtools::cache_clean_hash]⁠ removes all cache dirs for the given hash. Also cleans up the cache metadata.

⁠[iarccrgtools::cache_clean_all]⁠ removes all cache dirs. Also cleans up the cache metadata.


WetRobot/iarccrgtools documentation built on Feb. 1, 2024, 6:33 a.m.