pub fn write_atomic(path: &Path, contents: impl AsRef<[u8]>) -> Result<()>
Replace path through a temp file and rename. We write through a symlink to its target and keep the target’s permissions.
path