Skip to main content

Module durable_fs

Module durable_fs 

Source
Expand description

Crash-durable same-directory file publication primitives. Crash-durable same-directory file publication.

Unix durability requires syncing directory metadata after publication. Windows directory handles do not provide the same portable contract, so publication uses MoveFileExW(MOVEFILE_WRITE_THROUGH) instead. Unsupported platforms fail closed rather than claiming durable output after a no-op.

Enums§

DurableRenameMode
Whether publication may replace an existing destination.

Functions§

durable_rename
Publishes a synced temporary file under a same-directory destination and does not return until the rename metadata is durably flushed.
ensure_durable_directory
Creates every missing directory component with a crash-durable parent publication before returning.