Skip to main content

write_atomic_private

Function write_atomic_private 

Source
pub fn write_atomic_private(
    path: &Path,
    data: &[u8],
) -> Result<(), PrivateFsError>
Expand description

Atomically replace path with data: the temp file is created in the same directory with create_new + mode 0600 (never create-then-chmod, so no interval is broader than policy), written, then renamed over the target. A symlink at the target or temp path yields a typed refusal.