File

From RubySpec

Jump to: navigation, search

Contents

Pubic class methods

File.atime

From ri:

------------------------------------------------------------ File.atime
     File.atime(name)   ->  Time or propagate an Errno::ENOENT exception
------------------------------------------------------------------------
  Returns the last access time for the named file as a Time object.
  File.atime("testfile")   #=> Wed Apr 09 08:51:48 CDT 2003

File.ctime

From ri:

------------------------------------------------------------ File.atime
     File.ctime(name)   ->  Time or propagate an Errno::ENOENT exception
------------------------------------------------------------------------
   Returns the change time for file (that is, the time directory information about the file was changed, not the file itself).
  File.new("testfile").ctime   #=> Wed Apr 09 08:53:14 CDT 2003

Public instance methods

File#atime

From ri:

------------------------------------------------------------ File#atime
     @file.atime   ->  Time or epoch
------------------------------------------------------------------------
   Returns the last access time (a Time object)
   for file, or epoch if file has not been accessed.
   File.new("testfile").atime   #=> Wed Dec 31 18:00:00 CST 1969
Personal tools