Skip to main content

write_atomic

Function write_atomic 

Source
pub fn write_atomic(path: &str, data: &[u8], mode: u32) -> Result<()>
Expand description

Write data to a file atomically using a temp file + rename.

On Unix, sets the file mode to mode (e.g. 0o600 for secrets).