Method: File::Stat#dev

Defined in:
file.c

#devInteger

Returns an integer representing the device on which stat resides.

File.stat("testfile").dev   #=> 774

Returns:



594
595
596
597
598
599
600
601
602
603
604
# File 'file.c', line 594

static VALUE
rb_stat_dev(VALUE self)
{
#if SIZEOF_STRUCT_STAT_ST_DEV <= SIZEOF_DEV_T
    return DEVT2NUM(get_stat(self)->st_dev);
#elif SIZEOF_STRUCT_STAT_ST_DEV <= SIZEOF_LONG
    return ULONG2NUM(get_stat(self)->st_dev);
#else
    return ULL2NUM(get_stat(self)->st_dev);
#endif
}