class method
File.mtime
(::string | ::_ToPath | ::IO file_name) -> ::Time
File.mtime(file_name) → time
file.c
View on GitHub ↗
static VALUE
rb_file_s_mtime(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_time(stat_mtimespec(&st));
}