Skip to main content

atomic_write

Function atomic_write 

Source
pub fn atomic_write(path: &Path, content: &str) -> Result<()>
Expand description

Write content to path atomically using a temp-file + rename pattern. Prevents file corruption if the process is interrupted mid-write.