Skip to main content

sync_directory

Function sync_directory 

Source
pub fn sync_directory(dir: &Path) -> Result<()>
Expand description

Makes renames into dir survive a power loss by fsyncing it on Unix. File systems that cannot sync a directory are not an error. No-op on Windows, where the rename writes through.

ยงErrors

When the directory cannot be opened or the sync fails.