pub fn atomic_write(path: &Path, content: &str) -> Result<()>Expand description
Write a file atomically: write to a temp file, sync, then rename. Prevents partial writes on crash. Uses PID-scoped tmp to avoid collision when concurrent processes write the same target.