Method: File.atime
- Defined in:
- file.c
.atime(file_name) ⇒ Time
Returns the last access time for the named file as a Time object.
file_name can be an IO object.
File.atime("testfile") #=> Wed Apr 09 08:51:48 CDT 2003
2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 |
# File 'file.c', line 2296
static VALUE
rb_file_s_atime(VALUE klass, VALUE fname)
{
struct stat st;
if (rb_stat(fname, &st) < 0) {
int e = errno;
FilePathValue(fname);
rb_syserr_fail_path(e, fname);
}
return stat_atime(&st);
}
|