Skip to contents

Executes scan_storage() and stores the resulting observational dataset as a timestamped .rds snapshot.

Usage

snapshot_storage(
  root,
  storage_id = "l480-ssd",
  person_id = "antaldaniel",
  scan_time = Sys.time(),
  label = NULL,
  path = here::here("data-raw", "snapshots"),
  compute_signature = TRUE,
  max_signature_size = 200 * 1024 * 1024
)

Arguments

root

Character. Path to the root folder to scan.

storage_id

Character. Identifier of the storage.

person_id

Character. Identifier of the person.

scan_time

POSIXct. Timestamp of the scan.

label

Character. Optional human-readable label describing the scanned scope (e.g. "d_eviota").

path

Character. Directory where snapshots are stored.

compute_signature

Logical. Whether to compute fast file signatures.

max_signature_size

Numeric. Maximum file size in bytes for signatures.

Value

Invisibly returns the path to the stored snapshot.

Invisibly returns the full path to the saved snapshot.

Details

Each snapshot captures the state of file instantiations at a specific point in time, preserving:

  • file-level metadata

  • structural context

  • globally contextualised file paths (storage_id::local_path)

  • optional content signatures

  • repository associations

Snapshots are intended as:

  • durable audit artefacts

  • inputs for longitudinal analysis

  • reproducible evidence of observed environments

Since schema version 0.1.3, snapshots store full_path values as globally contextualised paths:

storage_id::local_filesystem_path

This prevents collisions between similar local folder structures observed on different machines or storage contexts.

Examples

if (FALSE) { # \dontrun{
snapshot_storage("D:/_markdown", "l480-ssd", label = "d_markdown")
} # }