From: hensleyl@... (Leslie Hensley) Date: 2002-01-17T03:55:44+09:00 Subject: [RCR] #59 Add fsync method to IO class Adding fsync and fdatasync methods to the IO class will allow Ruby to be used to address problem domains where it must be guaranteed that data has been written to the disk. Examples of these are logging for security purposes and transactional systems. The posix functions fsync and fdatasync guarantee that any data that the OS is buffering for a file is written to disk. This is distinct from IO#sync= which only addresses if Ruby buffers the data above the OS level. As for portability concerns, these methods seem just as reasonable as IO#fcntl. Man page for fsync and fdatasync: http://linux.ctyme.com/man/man0600.htm A first draft of a patch to Ruby 1.6.6 to accomplish this: http://www.papermountain.org/twiki/bin/view/Stuff/RubyFsyncPatch Note: please post comments to/vote for this RCR at http://www.rubygarden.org/article.php?sid=160