Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
The time is returned as a Time object : mtime « File Directory « Ruby
Ruby
File Directory
mtime
The time is returned as a Time object
t = File.mtime(
"text.txt"
) puts t.hour puts t.min puts t.sec
Related examples in the same category
1.
To establish when a file was last modified, use File.mtime: