Skip to main content

replace

Function replace 

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

Bytes written beside path under a hidden name of their own, then renamed over it: a reader never finds the file empty or half written (the sharing reads without the lock), and a full disk leaves the file as it was rather than empty (review of 5 October 2026, F10).