Hi all,
I'm new with ruby and I'm just still learning with this language
(which is quite good ;-)).
I have ruby 1.6.1 and linux
My code:
#!/usr/local/bin/ruby
#logfile = File.new("/home/eric/rubytest/fact.rb","r")
logfile = File.open("/home/eric/rubytest/fact.rb", "r")
print logfile.size("/home/eric/rubytest/fact.rb"), "\n"
I have all the rights for the dedicated file.
I tryed new and open method with various mode and size method
with or without parameters. If I replace the method 'size' with 'atime',
it works well. I had a look in mailing list and news group archives
but couldn't find any answers to my question. I'm using manual
for 1.4, is it still valid?
what did I miss that I can't know the size of the file? I tested
as well other methods which didn't work in File class. Can
anyone help?
Tkx in advance
regards
--
Éòic