Skip to main content

write_atomic_std

Function write_atomic_std 

Source
pub fn write_atomic_std(path: &Path, contents: impl AsRef<[u8]>) -> Result<()>
Expand description

Write bytes to path atomically, best-effort.

The write happens via a temporary file in the same directory followed by a rename.