Skip to main content

write_atomic

Function write_atomic 

Source
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.