Expand description
Filesystem-backed MemWriter — the gix-free
companion to [memstead_git_branch::storage::git_tree::GitTreeMemWriter].
Used by filesystem mems, where entities live as plain files under a
workspace root and there is no commit history.
§Buffer + commit
Mutations buffer in memory until FilesystemMemWriter::commit.
Per-path final-state collapse mirrors the git-tree adapter: a chain
of write/delete ops on the same path collapses to a single terminal
state by commit time. Move resolves at call-time into a
Delete(from) + Upsert(to, bytes) pair — bytes come from the
pending buffer when present, otherwise from the live file on disk.
§Atomicity
Per-file writes are atomic via write-to-temp + rename. Multi-op commits are not transactional: a failure partway through leaves earlier ops landed and later ops untouched. Single-writer is assumed; concurrent writers against the same mem are out of scope.
§CommitId
There is no commit history. [Self::commit] returns a synthetic
opaque id (UNIX-nanos + counter, hex) to satisfy the trait surface.
Callers that pass this through _hash envelopes get a unique
per-commit token but no CAS guarantee — there is no parent state to
compare against.
Structs§
- Filesystem
MemWriter - Filesystem-backed
MemWriter. Mutations buffer in memory untilSelf::commit; commit replays them against the directory atrootwith per-file write-to-temp + rename atomicity.