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 <rogerpack2005 / gmail.com> 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
> => #<File:README>
> >> 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