R
Roger Pack
I am thinking this would be a nice function to have in the stdlib.
File#size
thoughts?
-=r
File#size
thoughts?
-=r
I am thinking this would be a nice function to have in the stdlib.
File#size
thoughts?
Dylan said: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.
=> 3
But at least it's pretty close.
-=r
Roger said:It appears that #tell gives you the size of the file you're writing to,
and File#stat.size tells you the filesize of files you're reading from,
is that right?
* "David A. Black said:Hi --
I think Roger means an instance method.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.