pub fn atomic_write(path: &Path, bytes: &[u8]) -> Result<()>
Atomically write bytes to path via a temp file and rename.
bytes
path