Class: XFS::ShortFormHeader
- Inherits:
-
Object
- Object
- XFS::ShortFormHeader
- Defined in:
- lib/fs/xfs/short_form_header.rb
Instance Attribute Summary collapse
-
#entry_count ⇒ Object
readonly
Returns the value of attribute entry_count.
-
#parent_inode ⇒ Object
readonly
Returns the value of attribute parent_inode.
-
#short_form_header ⇒ Object
readonly
Returns the value of attribute short_form_header.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#small_inode ⇒ Object
readonly
Returns the value of attribute small_inode.
Instance Method Summary collapse
-
#initialize(data) ⇒ ShortFormHeader
constructor
A new instance of ShortFormHeader.
Constructor Details
#initialize(data) ⇒ ShortFormHeader
Returns a new instance of ShortFormHeader.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/fs/xfs/short_form_header.rb', line 28 def initialize(data) @short_form_header = DIRECTORY_SHORTERFORM_HEADER.decode(data) @entry_count = @short_form_header['entry_count'] i8byte_count = @short_form_header['i8byte_count'] @parent_inode = @short_form_header['parent_ino_4byte'] @size = SIZEOF_DIRECTORY_SHORTERFORM_HEADER @small_inode = true if @entry_count == 0 @entry_count = i8byte_count @short_form_header = DIRECTORY_SHORTFORM_HEADER.decode(data) @parent_inode = @short_form_header['parent_ino_8byte'] @size = SIZEOF_DIRECTORY_SHORTFORM_HEADER @small_inode = nil end end |
Instance Attribute Details
#entry_count ⇒ Object (readonly)
Returns the value of attribute entry_count.
26 27 28 |
# File 'lib/fs/xfs/short_form_header.rb', line 26 def entry_count @entry_count end |
#parent_inode ⇒ Object (readonly)
Returns the value of attribute parent_inode.
26 27 28 |
# File 'lib/fs/xfs/short_form_header.rb', line 26 def parent_inode @parent_inode end |
#short_form_header ⇒ Object (readonly)
Returns the value of attribute short_form_header.
26 27 28 |
# File 'lib/fs/xfs/short_form_header.rb', line 26 def short_form_header @short_form_header end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
26 27 28 |
# File 'lib/fs/xfs/short_form_header.rb', line 26 def size @size end |
#small_inode ⇒ Object (readonly)
Returns the value of attribute small_inode.
26 27 28 |
# File 'lib/fs/xfs/short_form_header.rb', line 26 def small_inode @small_inode end |