# File lib/ole/storage/meta_data.rb, line 98
      def mime_type
        # based on the CompObj stream contents
        type = FORMAT_MAP[file_format]
        return MIME_TYPES[type] if type

        # based on the root clsid
        type = CLSID_MAP[Types::Clsid.load(@ole.root.clsid)]
        return MIME_TYPES[type] if type

        # fallback to heuristics
        has_file = Hash[*@ole.root.children.map { |d| [d.name.downcase, true] }.flatten]
        return MIME_TYPES[:msg] if has_file['__nameid_version1.0'] or has_file['__properties_version1.0']
        return MIME_TYPES[:doc] if has_file['worddocument'] or has_file['document']
        return MIME_TYPES[:xls] if has_file['workbook'] or has_file['book']

        MIME_TYPES[nil]
      end