Function save

Source
pub fn save(data: &UserData, path: &Path) -> Result<(), StoreError>
Expand description

Saves what the user wrote, atomically.

Written pretty, unlike the catalog. The catalog is machine output that nobody reads; this file is the one a user may want to open, grep, or repair by hand after a bad restore, and it is small enough for that to cost nothing. An exclusive temporary output prevents an existing temporary symlink from being followed; a symlink at the final path is refused.