Skip to main content

Module atomic_write

Module atomic_write 

Source
Expand description

Atomic file write utility.

Protocol invariant: repository writes MUST be atomic.

Implementation: write temp file → flush → fsync → rename. This prevents partial writes from corrupting the repository.

Enums§

AtomicWriteError
Error type for atomic write operations.

Functions§

atomic_write
Atomically write content to a file.