pub fn write_atomic(path: &Path, bytes: &[u8]) -> Result<()>Expand description
Atomically and durably replace path with bytes (see the module docs for
the write/fsync/rename/fsync sequence). The parent directory is created if
missing. On a rename failure the temp file is cleaned up rather than leaked.