From: Dylan Evans Date: 2009-02-08T00:47:52+09:00 Subject: Re: File#size --000e0cd14d66697fa8046256120e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I didn't know that, but it's something to bear in mind. I haven't read the code but i suspect that it is a shortcut for File::Stat.new('file').size On Sun, Feb 8, 2009 at 1:34 AM, Roger Pack wrote: > Dylan Evans wrote: > > How about file.stat.size ? > > ooh that's really close. > I might want one that takes into account unflushed buffers, though. > Apparently .stat.size doesn't quite. > > >> a.write 'abc' > => 3 > >> a.stat.size > => 0 > >> a.flush > => # > >> a.stat.size > => 3 > > But at least it's pretty close. > -=r > -- > Posted via http://www.ruby-forum.com/. > > -- The UNIX system has a command, nice ... in order to be nice to the other users. Nobody ever uses it." - Andrew S. Tanenbaum --000e0cd14d66697fa8046256120e--