pub fn atomic_write(path: &Path, content: &[u8]) -> Result<()>Expand description
Atomic write: write content to a PID-suffixed temp file with chmod 600, then rename. Uses O_EXCL (create_new) to prevent symlink attacks on the temp file path. Cleans up the temp file on failure.