pub fn write_atomic(path: &Path, contents: &[u8]) -> Result<()>
Write contents to path atomically via a temp file in the same directory.
contents
path