make_scan_filename: Create a stable filename for an observational snapshot

View source: R/make_scan_filename.R

make_scan_filenameR Documentation

Create a stable filename for an observational snapshot

Description

Generates a filesystem-safe, chronologically sortable filename for storing observational snapshot artefacts.

Usage

make_scan_filename(storage_id, scan_time = Sys.time(), label = NULL)

Arguments

storage_id

Character. Identifier of the storage context.

scan_time

POSIXct. Timestamp of the observation event (default: current time).

label

Character. Optional label describing the observed scope.

Details

The filename encodes:

  • storage context (storage_id)

  • optional observational scope (label)

  • scan timestamp

  • a short deterministic uniqueness hash

The generated filename acts as a lightweight external identifier for a stored observational snapshot.

The naming scheme is intended to support:

  • reproducible archival storage

  • chronological ordering

  • provenance-aware reconstruction

  • comparison of repeated filesystem observations

The generated hash is deterministic for identical inputs and helps avoid filename collisions between similar scan events.

The function does not assign documentary identity or Record Set semantics. It creates identifiers for stored observational artefacts.

Value

Character. Snapshot filename ending in .rds.


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