Method: File::Stat#ino
- Defined in:
- file.c
#ino ⇒ Integer
Returns the inode number for stat.
File.stat("testfile").ino #=> 1083669
658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 |
# File 'file.c', line 658 static VALUE rb_stat_ino(VALUE self) { #ifdef HAVE_STRUCT_STAT_ST_INOHIGH /* assume INTEGER_PACK_LSWORD_FIRST and st_inohigh is just next of st_ino */ return rb_integer_unpack(&get_stat(self)->st_ino, 2, SIZEOF_STRUCT_STAT_ST_INO, 0, INTEGER_PACK_LSWORD_FIRST|INTEGER_PACK_NATIVE_BYTE_ORDER| INTEGER_PACK_2COMP); #elif SIZEOF_STRUCT_STAT_ST_INO > SIZEOF_LONG return ULL2NUM(get_stat(self)->st_ino); #else return ULONG2NUM(get_stat(self)->st_ino); #endif } |