Find out when a file was created, modified, or last accessed with ctime, mtime, and atime, respectively : ctime « File Directory « Ruby






Find out when a file was created, modified, or last accessed with ctime, mtime, and atime, respectively


File::ctime( "file.rb" ) # => Wed Nov 08 10:06:37 -0700 2006
File::mtime( "file.rb" ) # => Wed Nov 08 10:44:44 -0700 2006
File::atime( "file.rb" ) # => Wed Nov 08 10:45:01 -0700 2006

 

Related examples in the same category

1.Get file creation time