sync()
public
Returns the current “sync mode” of
ios. When sync mode is true, all
output is immediately flushed to the underlying operating system and is not
buffered by Ruby internally. See also
IO#fsync.
f = File.new("testfile")
f.sync
Show source
static VALUE
rb_io_sync(VALUE io)
{
rb_io_t *fptr;
io = GetWriteIO(io);
GetOpenFile(io, fptr);
return (fptr->mode & FMODE_SYNC) ? Qtrue : Qfalse;
}