def name=(filename)
      @dirty = true
      # dot and double dot are special cases (no processing please).
      if filename != "." and filename != ".."
        if filename.size > 12 || (not filename.include?(".") && filename.size > 8)
          mkLongName(filename)
          @name = self.longName
        else
          @dir_ent['name'] = mkSfn(filename)
          @name = self.shortName
        end
      else
        @dir_ent['name']= filename.ljust(11)
        @name = filename
      end
    end
def name=(filename)
      @dirty = true
      # dot and double dot are special cases (no processing please).
      if filename != "." and filename != ".."
        if filename.size > 12 || (not filename.include?(".") && filename.size > 8)
          mkLongName(filename)
          @name = self.longName
        else
          @dir_ent['name'] = mkSfn(filename)
          @name = self.shortName
        end
      else
        @dir_ent['name']= filename.ljust(11)
        @name = filename
      end
    end
WRITE: change filename.