Skip to main content

write_atomic

Function write_atomic 

Source
pub fn write_atomic(path: &Path, text: &str) -> Result<()>
Expand description

Write text to path through a temp file and a rename, creating the directory.

A file already at path keeps its permissions (its mode on unix, its read-only flag elsewhere): the file may be shared with what an application keeps there, tokens included.