pub fn atomic_write(path: &Path, bytes: &[u8]) -> Result<(), ForgeError>Expand description
Atomically replace path with bytes.
The temp file is created in the destination’s parent directory (same volume, so rename is atomic), given the original’s permissions, fsynced, then renamed over the destination. Temp leftovers are cleaned up on error.