atime()
public
Returns the last access time (a Time object)
for <i>file</i>, or epoch if <i>file</i> has not been accessed.
File.new("testfile").atime
Show source
static VALUE
rb_file_atime(VALUE obj)
{
rb_io_t *fptr;
struct stat st;
GetOpenFile(obj, fptr);
if (fstat(fptr->fd, &st) == -1) {
rb_sys_fail_path(fptr->pathv);
}
return stat_atime(&st);
}