End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Pathname#ftype
pathname.ftype → string
ext/pathname/pathname.c
View on GitHub ↗
static VALUE
path_ftype(VALUE self)
{
return rb_funcall(rb_cFile, id_ftype, 1, get_strpath(self));
}
Returns “type” of file (“file”, “directory”, etc).
See File.ftype.