Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

IO#fdatasync

ios.fdatasync → 0 or nil

Immediately writes all buffered data in ios to disk.

If the underlying operating system does not support fdatasync(2), IO#fsync is called instead (which might raise a NotImplementedError).

See also #fcntl #fileno #external_encoding #flush also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1