Class: NTFS::Bitmap
- Inherits:
-
Object
- Object
- NTFS::Bitmap
- Defined in:
- lib/fs/ntfs/attrib_bitmap.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#length ⇒ Object
readonly
Returns the value of attribute length.
Class Method Summary collapse
-
.create_from_header(header, buf) ⇒ Object
BITMAP_ATTR - Attribute: Bitmap (0xb0).
Instance Method Summary collapse
-
#initialize(buf) ⇒ Bitmap
constructor
A new instance of Bitmap.
Constructor Details
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
19 20 21 |
# File 'lib/fs/ntfs/attrib_bitmap.rb', line 19 def data @data end |
#length ⇒ Object (readonly)
Returns the value of attribute length.
19 20 21 |
# File 'lib/fs/ntfs/attrib_bitmap.rb', line 19 def length @length end |
Class Method Details
.create_from_header(header, buf) ⇒ Object
BITMAP_ATTR - Attribute: Bitmap (0xb0).
Contains an array of bits (aka a bitfield).
When used in conjunction with the index allocation attribute, each bit corresponds to one index block within the index allocation attribute. Thus the number of bits in the bitmap * index block size / cluster size is the number of clusters in the index allocation attribute.
13 14 15 16 17 |
# File 'lib/fs/ntfs/attrib_bitmap.rb', line 13 def self.create_from_header(header, buf) return Bitmap.new(buf) if header.containsFileNameIndexes? $log.debug("Skipping #{header.typeName} for name <#{header.name}>") if $log nil end |