sync=(p1) public

Sets the ``sync mode’‘ to true or false. When sync mode is true, all output is immediately flushed to the underlying operating system and is not buffered internally. Returns the new state. See also IO#fsync.

   f = File.new("testfile")
   f.sync = true

(produces no output)

Show source
Register or log in to add new notes.