Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
File::Stat#ctime
stat.ctime → time
file.c
View on GitHub ↗
static VALUE
rb_stat_ctime(VALUE self)
{
return stat_ctime(get_stat(self));
}
Returns the change time for stat (that is, the time directory information about the file was changed, not the file itself).
Note that on Windows (NTFS), returns creation time (birth time).
Example
File.stat("testfile").ctime #=> Wed Apr 09 08:53:14 CDT 2003