pub fn write(path: &Path, bytes: &[u8]) -> Result<()>Expand description
Write bytes at path through a same-directory temporary file and a
rename, creating the parent directories it needs.
ยงErrors
Any I/O failure from creating, writing, or renaming; on failure the temporary file is removed and the destination holds what it held.