Skip to main content

write_atomic

Function write_atomic 

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

Write bytes to path so a reader never sees half a file: a temp file in the same folder, flushed, then renamed over it.