pub fn atomic_write(path: &Path, contents: &str) -> Result<()>
Atomically replace path with contents, preserving existing permission bits (#422).
path
contents