From: gabriele renzi Date: 2004-05-04T15:54:01+09:00 Subject: Re: IO::write il Tue, 04 May 2004 00:05:05 -0500, Charles Comstock ha scritto:: >Why is there only an IO::read, and no equivalent IO::write that takes a >filename, a string to write, and an optional offset in the file to start >writing at? Or better yet an IO::write(filename[,offset])= string Agreed, that would be cool. There is an implementation on the extensions page at rubyforge: write(path, data) Writes the given data to the given path and closes the file. This is done in binary mode, complementing IO.read in standard Ruby. [Source] # File extensions/io.rb, line 24 def write(path, data) File.open(path, "wb") do |file| return file.write(data) end end but as you see this misses the offset argument, that may be needed.