Hi,
Is there a way were we can find about the “meta data information” of an
existing file in the directory using ruby, like
1)When the file was created,
2)When was it modifed
3)when was it accessed. etc.
ie. If we pass the “name/location of the file” it should print the
creation / modified time of that particular file.
Thank You,
Dinesh
Alexandru E. Ungur wrote:
1)When the file was created,
2)When was it modifed
3)when was it accessed. etc.
Yes, there is: http://www.rubycentral.com/ref/ref_c_file.html
That page has docs for Ruby 1.6. You may prefer to look at the 1.8.4
(i.e. current stable release) docs:
http://ruby-doc.org/core/classes/File.html
–
James B.
“In physics the truth is rarely perfectly clear, and that is certainly
universally the case in human affairs. Hence, what is not surrounded
by
uncertainty cannot be the truth.”
sender: “James B.” date: “Mon, Apr 10, 2006 at 11:14:03PM +0900” <<<EOQ
[…]
Yes, there is: http://www.rubycentral.com/ref/ref_c_file.html
That page has docs for Ruby 1.6. You may prefer to look at the 1.8.4
(i.e. current stable release) docs:
class File - RDoc Documentation
Oh, I would definitely prefer that thank you!
I was using the other one simply because it was listed here:
Ruby Programming Language (which I think it’s the ‘official’ Ruby
site? but I may be wrong there as well, I’m pretty new to Ruby), the
second link under ‘Documents’.
Thanks again!
and have a good night everyone,
Alex