Skip to main content

write_private

Function write_private 

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

Writes bytes as the file at path: beside it first and then in its place, so it is never there half written, readable by its owner alone (0600 on Unix), and never written through a link or into a file someone else can read.

ยงErrors

Returns an error when the file cannot be created, written or put in place.