Skip to main content

write_atomically

Function write_atomically 

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

Replaces path with bytes atomically: a temporary file beside it, flushed to disk, then renamed over it, so a reader never sees half a file.

ยงErrors

The I/O error of any step.