code: public CmsFolder readFolder(CmsRequestContext context, String resourcename, CmsResourceFilter filter)
      throws CmsException {
  
          CmsFolder result = null;
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          try {
              result = readFolder(dbc, resourcename, filter);
          } catch (Exception e) {
              dbc.report(null, Messages.get().container(Messages.ERR_READ_FOLDER_2, resourcename, filter), e);
          } finally {
              dbc.clear();
          }
          return result;
      }
docs: Reads a folder resource from the VFS,
  using the specified resource filter.<p>
  
  The specified filter controls what kind of resources should be "found"
  during the read operation. This will depend on the application. For example,
  using <code>{@link CmsResourceFilter#DEFAULT}</code> will only return currently
  "valid" resources, while using <code>{@link CmsResourceFilter#IGNORE_EXPIRATION}</code>
  will ignore the date release / date expired information of the resource.<p>
  
  @param context the current request context
  @param resourcename the name of the folder to read (full path)
  @param filter the resource filter to use while reading
  
  @return the folder that was read
  
  @throws CmsException if something goes wrong