Skip to main content

write_file

Function write_file 

Source
pub fn write_file(doc: &Document, path: &Path) -> Result<()>
Expand description

Serialize and atomically write a Document to path.

Writes to a temporary file in the same directory first, then renames into place to prevent corruption from interrupted writes. Callers are responsible for sorting entries before calling this function.