Skip to main content

write_atomic

Function write_atomic 

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

Write bytes to path atomically: temp file in the same directory → sync_all → rename over the destination. The rename is atomic on the same filesystem (and replaces an existing target on both Unix and Windows).