Skip to main content

write_private

Function write_private 

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

Writes bytes to path so that no other user can read them at any moment: on Unix the file is created with mode 0600 (not written world-readable and tightened afterwards), and on every platform restrict_to_owner then settles an existing file’s mode or access list.