Skip to main content

atomic_write_bytes

Function atomic_write_bytes 

Source
pub fn atomic_write_bytes(path: &Path, content: &[u8]) -> Result<()>
Expand description

Write bytes to a file atomically (temp file + fsync + rename). Use this instead of std::fs::write for any file that must survive power loss.