Skip to main content

atomic_write

Function atomic_write 

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

Atomically write data to path by writing to a temp file first, then renaming. This prevents partial writes from corrupting the target file.