pub fn write_atomically(path: &Path, contents: &str) -> Result<()>
Write contents to path atomically: to a sibling temporary file first, then renamed over path, so a reader never sees a half-written file.
contents
path