pub fn sync_directory(dir: &Path) -> Result<(), Error>Expand description
Make a preceding rename/create/remove in dir durable, reporting
failure. On Unix this fsyncs the directory. Windows cannot flush a directory
through a plain File::open (it fails with ERROR_ACCESS_DENIED); NTFS
journals directory metadata itself, so only the directory’s existence is
verified there — the same contract as the #[cfg(unix)] sync sites
elsewhere in the crate.