pub fn sync_dir(dir: &Path) -> Result<()>
fsync a directory, so a rename into it or an unlink from it survives a power cut — its failure is the caller’s failure, never swallowed.