Method: File::Stat#ftype

Defined in:
file.c

#ftypeString

Identifies the type of stat. The return string is one of: <code>file</code>'', <code>directory'', <code>characterSpecial</code>'', <code>blockSpecial'', <code>fifo</code>'', <code>link'', <code>socket</code>'', or <code>unknown''.

File.stat("/dev/tty").ftype   #=> "characterSpecial"

Returns:



5739
5740
5741
5742
5743
# File 'file.c', line 5739

static VALUE
rb_stat_ftype(VALUE obj)
{
    return rb_file_ftype(get_stat(obj));
}