Function rustix::fs::fsync
pub fn fsync<Fd: AsFd>(fd: &Fd) -> io::Result<()>
Documentation
fsync(fd)
—Ensures that file data and metadata is written to the
underlying storage device.
Note that on iOS and macOS this isn’t sufficient to ensure that data has
reached persistent storage; use fcntl_fullfsync
to ensure that.