Expand description
Where a session lives on disk, and what it remembers.
Concept 6.4. Not the system temporary directory, which is the obvious
place and the wrong one: a reboot, a tmpfiles cleaner or Storage Sense may
delete anything there, and doing so would destroy an edit the user has made
and the tool has not yet written back — silently, in the window concept 6.3
exists to survive.
So a session is a directory under the application’s own per-user state directory, and recovery is a scan of that one tree rather than a record pointing somewhere that may no longer be there.
§The content file sits one level down
A session directory holds session.toml and a content/ directory, and the
content file goes inside the latter under its own name. Two reasons, and the
first is a collision: SPEC 2.3 permits any plain filename, session.toml
included, so a content file beside the record could overwrite it. The second
is that concept 6.1 reads anything else in the directory as the target
application’s doing, and that inference is only sound if the tool put
exactly one file there.
Structs§
Functions§
- create
- Start a session under
root, creating the tree if it is not there. - default_
root - The per-user state directory this build keeps sessions under.
- find
- The session under
rootwith this directory name. - scan
- Every session under
root, open or left behind.