Skip to main content

write_atomically

Function write_atomically 

Source
pub fn write_atomically(path: &Path, contents: &str) -> Result<()>
Expand description

Write contents to path atomically: to a sibling temporary file first, then renamed over path, so a reader never sees a half-written file.