pub fn sync_parent_dir(path: &Path) -> Result<(), Error>Expand description
Make the directory entry of path durable: fsync its parent directory.
File::sync_all makes the data of a file durable, not its name in the
directory: after a power loss a synced run or archive can be missing from
its folder. Call this after a file is created or renamed. A no-op where a
directory cannot be opened for syncing (Windows).
§Errors
The I/O error of opening or syncing the parent directory.