Skip to main content

atomic_write

Function atomic_write 

Source
pub fn atomic_write(dest: &Path, content: &[u8]) -> Result<(), MarsError>
Expand description

Atomic file write: write to temp file in same directory, then rename.

The rename is atomic on POSIX. Temp files are in the same directory as the destination to guarantee same-filesystem atomic rename.