Skip to main content

Module created_set

Module created_set 

Source
Expand description

The per-directory set of sessions this controller created (OpenCode host guard).

Files in the ctl home: created.<key>.json = [{id, directory}] and its sidecar created.<key>.lock, which carries a File::lock for every read-merge-write.

Structsยง

CreatedSet
Entry

Constantsยง

PROBE_LIMIT
Ids probed with session.get per append at most.
SWEEP_MAX_AGE_MS
30 days, the age past which sweep removes untouched files.

Staticsยง

TMP_SEQ ๐Ÿ”’

Functionsยง

key_for
12 hex of sha256 of the canonicalised path (lexically normalised when it does not exist), Windows verbatim prefix stripped before hashing.
lexical_normalise ๐Ÿ”’
Resolve . and .. without touching the file system.
read_entries ๐Ÿ”’
strip_verbatim
Drop a Windows verbatim prefix: \\?\C:\x -> C:\x, \\?\UNC\h\s -> \\h\s.