Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
File.mtime
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_mtime(&st);
}