To establish when a file was last modified, use File.mtime: : mtime « File Directory « Ruby






To establish when a file was last modified, use File.mtime:


puts File.mtime("text.txt")

 

Related examples in the same category

1.The time is returned as a Time object