code: public List<CmsPublishedResource> getAllResources(CmsObject cms) throws CmsException {
  
          if (LOG.isDebugEnabled()) {
              LOG.debug(Messages.get().getBundle().key(Messages.LOG_GET_ALL_RESOURCES_0));
          }
          // TODO: to improve performance, get here only the resources to render from the configuration
  
          // read all from the root path, exclude resources flagged as internal
          List<CmsResource> vfsResources = cms.readResources(
              "/",
              CmsResourceFilter.ALL.addExcludeFlags(CmsResource.FLAG_INTERNAL));
  
          CmsExportFolderMatcher matcher = OpenCms.getStaticExportManager().getExportFolderMatcher();
          // loop through the list and create the list of CmsPublishedResources
          List<CmsPublishedResource> resources = new ArrayList<CmsPublishedResource>(vfsResources.size());
          Iterator<CmsResource> i = vfsResources.iterator();
          while (i.hasNext()) {
              CmsResource resource = i.next();
              if (!matcher.match(resource.getRootPath())) {
                  // filter files that do not match the resources to render
                  continue;
              }
              CmsPublishedResource pubRes = new CmsPublishedResource(resource);
              if (LOG.isDebugEnabled()) {
                  LOG.debug(Messages.get().getBundle().key(Messages.LOG_PROCESSING_1, resource.getRootPath()));
              }
              resources.add(pubRes);
          }
  
          if (LOG.isDebugEnabled()) {
              LOG.debug(Messages.get().getBundle().key(Messages.LOG_NUM_RESOURCES_1, new Integer(resources.size())));
          }
          return resources;
      }
docs: Returns all resources within the current OpenCms site that are not marked as internal.<p>
  
  The result list contains objects of type {@link CmsPublishedResource}.<p>
  
  @param cms the cms context
  
  @return all resources within the current OpenCms site that are not marked as internal
  
  @throws CmsException if something goes wrong