stat()
public
Returns status information for ios as an object of type File::Stat.
f = File.new("testfile")
s = f.stat
"%o" % s.mode
s.blksize
s.atime
Show source
static VALUE
rb_io_stat(VALUE obj)
{
rb_io_t *fptr;
struct stat st;
GetOpenFile(obj, fptr);
if (fstat(fptr->fd, &st) == -1) {
rb_sys_fail_path(fptr->pathv);
}
return rb_stat_new(&st);
}