The following command can be used to find when a file was created, modified, or last accessed :

File::ctime( "dir.xml" )
#=> 2010-06-05 16:47:18 +0100
File::mtime( "dir.xml" )
#=> 2010-06-05 16:47:18 +0100
File::atime( "dir.xml" )
#=> 2010-06-05 16:47:28 +0100

Resources:
- Ruby File I/O, Directories [tutorialspoint.com]

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/sQNp3n10WNM/11545