code: protected void prepareResourceCondition(CmsUUID projectId, int mode, StringBuffer conditions) {
  
          if ((mode & CmsDriverManager.READMODE_ONLY_FOLDERS) > 0) {
              // C_READMODE_ONLY_FOLDERS: add condition to match only folders
              conditions.append(BEGIN_INCLUDE_CONDITION);
              conditions.append(m_sqlManager.readQuery(projectId, "C_RESOURCES_SELECT_ONLY_FOLDERS"));
              conditions.append(END_CONDITION);
          } else if ((mode & CmsDriverManager.READMODE_ONLY_FILES) > 0) {
              // C_READMODE_ONLY_FILES: add condition to match only files
              conditions.append(BEGIN_INCLUDE_CONDITION);
              conditions.append(m_sqlManager.readQuery(projectId, "C_RESOURCES_SELECT_ONLY_FILES"));
              conditions.append(END_CONDITION);
          }
      }
docs: Appends the appropriate selection criteria related with the read mode.<p>
  
  @param projectId the id of the project of the resources
  @param mode the selection mode
  @param conditions buffer to append the selection criteria