pub fn write_atomic(path: &Path, bytes: &[u8]) -> Result<()>Expand description
Write bytes to path atomically: tempfile in the same directory, then
rename, then a parent-directory fsync. The tempfile is fsynced before
the rename. Creates the parent directory if absent.