Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

File::Stat#atime

() -> ::Time
stat.atime → time

Returns the last access time for this file as an object of class Time.

Example
File.stat("testfile").atime   #=> Wed Dec 31 18:00:00 CST 1969
See also #<=> #birthtime .new #blksize also in 4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0