pub fn atomic_write(path: &Path, content: &[u8]) -> Result<()>
Atomically write content to a file via a temporary file and rename.
Resolves symlinks first and preserves the target file’s existing permissions on Unix.