rustix::fs

Function fsync

Source
pub fn fsync<Fd: AsFd>(fd: Fd) -> Result<()>
Expand description

fsync(fd)—Ensures that file data and metadata is written to the underlying storage device.

On iOS and macOS this isn’t sufficient to ensure that data has reached persistent storage; use fcntl_fullfsync to ensure that.

§References