code: private CmsPathMap<CmsResource> readPathMapForType(I_CmsResourceType type) {
  
          List<CmsResource> result = new ArrayList<CmsResource>();
          CmsResourceFilter filter = CmsResourceFilter.DEFAULT_FILES.addRequireType(type);
          try {
              List<CmsResource> siteFiles = m_guestCms.readResources(m_siteRoot, filter, true);
              result.addAll(siteFiles);
          } catch (CmsException e) {
              LOG.error("XML sitemap generator error: " + e.getLocalizedMessage(), e);
          }
          String shared = CmsFileUtil.removeTrailingSeparator(OpenCms.getSiteManager().getSharedFolder());
          if (shared != null) {
              try {
                  List<CmsResource> sharedFiles = m_guestCms.readResources(shared, filter, true);
                  result.addAll(sharedFiles);
              } catch (CmsException e) {
                  LOG.error("XML sitemap generator error: " + e.getLocalizedMessage(), e);
              }
          }
          CmsPathMap<CmsResource> resultMap = new CmsPathMap<CmsResource>();
          for (CmsResource resource : result) {
              resultMap.add(resource.getRootPath(), resource);
          }
          return resultMap;
      }
docs: Reads the contents of a given type and stores them in a path map.<p>
  
  @param type the type for which to read the contents
  @return the path map containing the contents