def dump
      out = "\#<#{self.class}:0x#{'%08x' % self.object_id}>\n"
      if @lfn_ents
        out += "LFN Entries:\n"
        @lfn_ents.each {|ent|
          out += "Sequence num : 0x#{'%02x' % ent['seq_num']}\n"
          n = ent['name']; n.UnicodeToUtf8! unless n == nil
          out += "Name1        : '#{n}'\n"
          out += "Attributes   : 0x#{'%02x' % ent['attributes']}\n"
          out += "Reserved1    : 0x#{'%02x' % ent['reserved1']}\n"
          out += "Checksum     : 0x#{'%02x' % ent['checksum']}\n"
          n = ent['name2']; n.UnicodeToUtf8! unless n == nil
          out += "Name2        : '#{n}'\n"
          out += "Reserved2    : 0x#{'%04x' % ent['reserved2']}\n"
          n = ent['name3']; n.UnicodeToUtf8! unless n == nil
          out += "Name3        : '#{n}'\n\n"
        }
      end
      out += "SFN Entry:\n"
      out += "Name         : #{@dir_ent['name']}\n"
      out += "Attributes   : 0x#{'%02x' % @dir_ent['attributes']}\n"
      out += "Reserved1    : 0x#{'%02x' % @dir_ent['reserved1']}\n"
      out += "CTime, tenths: 0x#{'%02x' % @dir_ent['ctime_tos']}\n"
      out += "CTime, hms   : 0x#{'%04x' % @dir_ent['ctime_hms']}\n"
      out += "CTime, day   : 0x#{'%04x' % @dir_ent['ctime_day']} (#{cTime})\n"
      out += "ATime, day   : 0x#{'%04x' % @dir_ent['atime_day']} (#{aTime})\n"
      out += "First clus hi: 0x#{'%04x' % @dir_ent['first_clus_hi']}\n"
      out += "MTime, hms   : 0x#{'%04x' % @dir_ent['mtime_hms']}\n"
      out += "MTime, day   : 0x#{'%04x' % @dir_ent['mtime_day']} (#{mTime})\n"
      out += "First clus lo: 0x#{'%04x' % @dir_ent['first_clus_lo']}\n"
      out += "File size    : 0x#{'%08x' % @dir_ent['file_size']}\n"
    end
def dump
      out = "\#<#{self.class}:0x#{'%08x' % self.object_id}>\n"
      if @lfn_ents
        out += "LFN Entries:\n"
        @lfn_ents.each {|ent|
          out += "Sequence num : 0x#{'%02x' % ent['seq_num']}\n"
          n = ent['name']; n.UnicodeToUtf8! unless n == nil
          out += "Name1        : '#{n}'\n"
          out += "Attributes   : 0x#{'%02x' % ent['attributes']}\n"
          out += "Reserved1    : 0x#{'%02x' % ent['reserved1']}\n"
          out += "Checksum     : 0x#{'%02x' % ent['checksum']}\n"
          n = ent['name2']; n.UnicodeToUtf8! unless n == nil
          out += "Name2        : '#{n}'\n"
          out += "Reserved2    : 0x#{'%04x' % ent['reserved2']}\n"
          n = ent['name3']; n.UnicodeToUtf8! unless n == nil
          out += "Name3        : '#{n}'\n\n"
        }
      end
      out += "SFN Entry:\n"
      out += "Name         : #{@dir_ent['name']}\n"
      out += "Attributes   : 0x#{'%02x' % @dir_ent['attributes']}\n"
      out += "Reserved1    : 0x#{'%02x' % @dir_ent['reserved1']}\n"
      out += "CTime, tenths: 0x#{'%02x' % @dir_ent['ctime_tos']}\n"
      out += "CTime, hms   : 0x#{'%04x' % @dir_ent['ctime_hms']}\n"
      out += "CTime, day   : 0x#{'%04x' % @dir_ent['ctime_day']} (#{cTime})\n"
      out += "ATime, day   : 0x#{'%04x' % @dir_ent['atime_day']} (#{aTime})\n"
      out += "First clus hi: 0x#{'%04x' % @dir_ent['first_clus_hi']}\n"
      out += "MTime, hms   : 0x#{'%04x' % @dir_ent['mtime_hms']}\n"
      out += "MTime, day   : 0x#{'%04x' % @dir_ent['mtime_day']} (#{mTime})\n"
      out += "First clus lo: 0x#{'%04x' % @dir_ent['first_clus_lo']}\n"
      out += "File size    : 0x#{'%08x' % @dir_ent['file_size']}\n"
    end
Dump object.