code: protected void preparePathCondition(
          CmsUUID projectId,
          String parent,
          int mode,
          StringBuffer conditions,
          List<Object> params) {
  
          if (parent == CmsDriverManager.READ_IGNORE_PARENT) {
              // parent can be ignored
              return;
          }
  
          if ((mode & CmsDriverManager.READMODE_EXCLUDE_TREE) > 0) {
              // only return immediate children - use UUID optimization
              conditions.append(BEGIN_INCLUDE_CONDITION);
              conditions.append(m_sqlManager.readQuery(projectId, "C_RESOURCES_SELECT_BY_PARENT_UUID"));
              conditions.append(END_CONDITION);
              params.add(parent);
              return;
          }
  
          if ("/".equalsIgnoreCase(parent)) {
              // if root folder is parent, no additional condition is needed since all resources match anyway
              return;
          }
  
          // add condition to read path subtree
          conditions.append(BEGIN_INCLUDE_CONDITION);
          conditions.append(m_sqlManager.readQuery(projectId, "C_RESOURCES_SELECT_BY_PATH_PREFIX"));
          conditions.append(END_CONDITION);
          params.add(CmsFileUtil.addTrailingSeparator(escapeDbWildcard(parent)) + "%");
      }
docs: Appends the appropriate selection criteria related with the parentPath.<p>
  
  @param projectId the id of the project of the resources
  @param parent the parent path or UUID (if mode is C_READMODE_EXCLUDE_TREE)
  @param mode the selection mode
  @param conditions buffer to append the selection criteria
  @param params list to append the selection parameters