atime(p1)
public
Returns the last access time for the named file as a Time object).
File.atime("testfile")
Show source
/*
* call-seq:
* File.atime(file_name) => time
*
* Returns the last access time for the named file as a Time object).
*
* File.atime("testfile") #=> Wed Apr 09 08:51:48 CDT 2003
*
*/
static VALUE
rb_file_s_atime(klass, fname)
VALUE klass, fname;
{
struct stat st;
if (rb_stat(fname, &st) < 0)
rb_sys_fail(StringValueCStr(fname));
return rb_time_new(st.st_atime, 0);
}