pub fn save_atomic(path: &Path, bytes: &[u8]) -> Result<()>Expand description
Write bytes to path atomically: a temporary file in the same directory is
written and flushed, then renamed over the target. On failure the existing file
is left untouched and the temporary file is removed.