Class: NTFS::VolumeName
- Inherits:
-
Object
- Object
- NTFS::VolumeName
- Defined in:
- lib/fs/ntfs/attrib_volume_name.rb
Overview
VOLUME_NAME - Attribute: Volume name (0x60).
NOTE: Always resident. NOTE: Present only in FILE_Volume.
Data of this class is not structured.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(buf) ⇒ VolumeName
constructor
A new instance of VolumeName.
- #to_s ⇒ Object
Constructor Details
#initialize(buf) ⇒ VolumeName
Returns a new instance of VolumeName.
18 19 20 21 |
# File 'lib/fs/ntfs/attrib_volume_name.rb', line 18 def initialize(buf) buf = buf.read(buf.length) if buf.kind_of?(DataRun) @name = buf.UnicodeToUtf8 end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
16 17 18 |
# File 'lib/fs/ntfs/attrib_volume_name.rb', line 16 def name @name end |
Instance Method Details
#dump ⇒ Object
27 28 29 30 31 |
# File 'lib/fs/ntfs/attrib_volume_name.rb', line 27 def dump out = "\#<#{self.class}:0x#{'%08x' % object_id}>\n " out << @name out << "---\n" end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/fs/ntfs/attrib_volume_name.rb', line 23 def to_s @name end |