public Method

Stat.dev_minor

stat.dev_minor    fixnum

Returns the minor part of File_Stat#dev or nil.

File.stat("/dev/fd1").dev_minor   #=> 1
File.stat("/dev/tty").dev_minor   #=> 0

Source Code

/*
*  call-seq:
*     stat.dev_minor   => fixnum
*  
*  Returns the minor part of <code>File_Stat#dev</code> or
*  <code>nil</code>.
*     
*     File.stat("/dev/fd1").dev_minor   #=> 1
*     File.stat("/dev/tty").dev_minor   #=> 0
*/

static VALUE
rb_stat_dev_minor(self)
   VALUE self;
{
#if defined(minor)
   long dev = get_stat(self)->st_dev;
   return ULONG2NUM(minor(dev));
#else
   return Qnil;
#endif
}
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.