pub fn write_atomic(
path: &Path,
contents: &[u8],
mode: u32,
) -> Result<(), AtomicWriteError>Expand description
Write bytes to path using a temp file + replace.
The helper creates parent directories when needed and applies mode on Unix.