ctime()
public
Returns the change time for file (that is, the time directory
information about the file was changed, not the file itself).
File.new("testfile").ctime
Show source
/*
* call-seq:
* file.ctime -> time
*
* Returns the change time for <i>file</i> (that is, the time directory
* information about the file was changed, not the file itself).
*
* File.new("testfile").ctime
*
*/
static VALUE
rb_file_ctime(obj)
VALUE obj;
{
rb_io_t *fptr;
struct stat st;
GetOpenFile(obj, fptr);
if (fstat(fileno(fptr->f), &st) == -1) {
rb_sys_fail(fptr->path);
}
return rb_time_new(st.st_ctime, 0);
}