code: public List<CmsResource> readChildResources(
          CmsRequestContext context,
          CmsResource resource,
          CmsResourceFilter filter,
          boolean getFolders,
          boolean getFiles)
      throws CmsException, CmsSecurityException {
  
          List<CmsResource> result = null;
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          try {
              // check the access permissions
              checkPermissions(dbc, resource, CmsPermissionSet.ACCESS_READ, true, CmsResourceFilter.ALL);
              result = m_driverManager.readChildResources(dbc, resource, filter, getFolders, getFiles, true);
          } catch (Exception e) {
              dbc.report(
                  null,
                  Messages.get().container(Messages.ERR_READ_CHILD_RESOURCES_1, context.getSitePath(resource)),
                  e);
          } finally {
              dbc.clear();
          }
          return result;
      }
docs: Returns the child resources of a resource, that is the resources
  contained in a folder.<p>
  
  With the parameters <code>getFolders</code> and <code>getFiles</code>
  you can control what type of resources you want in the result list:
  files, folders, or both.<p>
  
  This method is mainly used by the workplace explorer.<p>
  
  @param context the current request context
  @param resource the resource to return the child resources for
  @param filter the resource filter to use
  @param getFolders if true the child folders are included in the result
  @param getFiles if true the child files are included in the result
  
  @return a list of all child resources
  
  @throws CmsException if something goes wrong
  @throws CmsSecurityException if the user has insufficient permission for the given resource (read is required)