public Method

Stat.ftype

stat.ftype    string

Identifies the type of stat. The return string is one of: ``file’’, ``directory’’, ``characterSpecial’’, ``blockSpecial’’, ``fifo’’, ``link’’, ``socket’’, or ``unknown’’.

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

Source Code

/*
*  call-seq:
*     stat.ftype   => string
*  
*  Identifies the type of <i>stat</i>. The return string is one of:
*  ``<code>file</code>'', ``<code>directory</code>'',
*  ``<code>characterSpecial</code>'', ``<code>blockSpecial</code>'',
*  ``<code>fifo</code>'', ``<code>link</code>'',
*  ``<code>socket</code>'', or ``<code>unknown</code>''.
*     
*     File.stat("/dev/tty").ftype   #=> "characterSpecial"
*     
*/

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

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.