pub fn sync_file(
path: &Path,
policy: &Policy,
component: FsyncComponents,
) -> Result<()>Expand description
Open path for writing (no truncate, no create) and apply policy’s
barrier for component. Convenience for post-hoc hardening of already
published files; write paths that hold the handle open should prefer
Policy::apply directly. Requires write access because sync_all
degrades to a permission error on read-only handles (Windows
FlushFileBuffers semantics).