rdev()
public
Returns an integer representing the device type on which stat
resides. Returns nil if the operating system doesn’t support
this feature.
File.stat("/dev/fd1").rdev
File.stat("/dev/tty").rdev
Show source
/*
* call-seq:
* stat.rdev => fixnum or nil
*
* Returns an integer representing the device type on which
* <i>stat</i> resides. Returns <code>nil</code> if the operating
* system doesn't support this feature.
*
* File.stat("/dev/fd1").rdev #=> 513
* File.stat("/dev/tty").rdev #=> 1280
*/
static VALUE
rb_stat_rdev(self)
VALUE self;
{
#ifdef HAVE_ST_RDEV
return ULONG2NUM(get_stat(self)->st_rdev);
#else
return Qnil;
#endif
}