code: protected List<CmsResource> allInFolderDateReleasedDesc(CmsObject cms, String param, boolean tree, int numResults)
      throws CmsException {
  
          CmsCollectorData data = new CmsCollectorData(param);
          String foldername = CmsResource.getFolderPath(data.getFileName());
  
          CmsResourceFilter filter = CmsResourceFilter.DEFAULT_FILES.addRequireType(data.getType()).addExcludeFlags(
              CmsResource.FLAG_TEMPFILE);
          if (data.isExcludeTimerange() && !cms.getRequestContext().getCurrentProject().isOnlineProject()) {
              // include all not yet released and expired resources in an offline project
              filter = filter.addExcludeTimerange();
          }
          List<CmsResource> result = cms.readResources(foldername, filter, tree);
  
          Collections.sort(result, I_CmsResource.COMPARE_DATE_RELEASED);
  
          return shrinkToFit(result, data.getCount(), numResults);
      }
docs: Returns a List of all resources in the folder pointed to by the parameter
  sorted by the release date, descending.<p>
  
  @param cms the current CmsObject
  @param param the folder name to use
  @param tree if true, look in folder and all child folders, if false, look only in given folder
  @param numResults the number of results
  
  @return a List of all resources in the folder pointed to by the parameter
  sorted by the release date, descending
  
  @throws CmsException if something goes wrong