Skip to main content

atomic_write

Function atomic_write 

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

Atomically write content to a file using temp + rename.

This ensures that readers either see the old content or the new content, never a partially written file.