pub fn atomic_write(path: &Path, data: &[u8]) -> Result<()>Expand description
Atomically write data to path.
Creates a temporary file in the same directory, writes data,
then renames it to path. On Unix this is atomic because
rename(2) on the same filesystem is guaranteed atomic.