Method: File.ctime
- Defined in:
- file.c
.ctime(file_name) ⇒ Time
Returns the change time for the named file (the time at which directory information about the file was changed, not the file itself).
file_name can be an IO object.
Note that on Windows (NTFS), returns creation time (birth time).
File.ctime("testfile") #=> Wed Apr 09 08:53:13 CDT 2003
2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 |
# File 'file.c', line 2047 static VALUE rb_file_s_ctime(VALUE klass, VALUE fname) { struct stat st; if (rb_stat(fname, &st) < 0) { FilePathValue(fname); rb_sys_fail_path(fname); } return stat_ctime(&st); } |