pub fn write_atomic(path: &str, data: &[u8], mode: u32) -> Result<()>
Write data to a file atomically using a temp file + rename.
On Unix, sets the file mode to mode (e.g. 0o600 for secrets).
mode
0o600