Skip to main content

durable_replace

Function durable_replace 

Source
pub fn durable_replace(
    from: &Path,
    to: &Path,
) -> Result<(), DurableReplaceError>
Expand description

Atomically replace to, then flush the publication before returning. The caller must sync the source file’s contents first. Neither path may be on a different filesystem; there is deliberately no copy/delete fallback. An error retains whether publication occurred before durability failed.