add_snapshot_context: Add contextual identifiers to snapshot observations

View source: R/add_snapshot_context.R

add_snapshot_contextR Documentation

Add contextual identifiers to snapshot observations

Description

Enriches filesystem observations with deterministic contextual identifiers used for longitudinal, cross-storage, and forensic reconstruction workflows.

Usage

add_snapshot_context(df)

Arguments

df

A snapshot data.frame created by scan_storage() or read_snapshot().

Details

The function preserves the original observational rows and adds contextual identifiers derived from:

  • storage context;

  • filesystem location;

  • observation time.

The package deliberately separates filesystem observation from later analytical interpretation and documentary aggregation.

The function therefore:

  • enriches filesystem observations with contextual identifiers;

  • supports repeated observation tracking across time;

  • supports comparison across storage systems;

  • does not construct Record Sets or higher-level documentary aggregations.

The added identifiers support:

  • reconstruction of distributed work environments;

  • provenance-aware analytical workflows;

  • longitudinal filesystem analysis;

  • cross-storage comparison of observations.

Added variables:

  • storage_full_path: globally contextualised filesystem locator (storage_id::full_path);

  • storage_path_id: deterministic storage-scoped filesystem identifier (storage_id::rel_path);

  • observation_id: deterministic identifier of a specific filesystem observation, combining storage context, relative path, and observation time.

Value

A data.frame enriched with additional contextual identifier variables.

Examples

data("fscontextdemo_snapshot_02")

snapshots <- add_snapshot_context(fscontextdemo_snapshot_02)

head(
  snapshots[
    ,
    c(
      "storage_full_path",
      "storage_path_id",
      "observation_id"
    )
  ]
)

fscontext documentation built on Nov. 19, 2026, 5:11 p.m.