Skip to main content

try_atomic_write

Function try_atomic_write 

Source
pub fn try_atomic_write(
    path: &Path,
    bytes: &[u8],
    permissions: Option<&Permissions>,
) -> Result<(), Error>
Expand description

Durable, crash-atomic write: a temp file in the same directory as path followed by rename over the target. Requires write permission on the parent directory; the read-only-directory fallback is handled by write_bytes_with_fallback.