code: @SuppressWarnings("deprecation")
      public CmsFolder readAncestor(String resourcename, int type) throws CmsException {
  
          return readAncestor(resourcename, CmsResourceFilter.requireType(type));
      }
docs: Returns the first ancestor folder matching the resource type.<p>
  
  If no folder with the requested resource type is found, null is returned.<p>
  
  @param resourcename the name of the resource to start (full current site relative path)
  @param type the resource type of the folder to match
  
  @return the first ancestor folder matching the filter criteria or null if no folder was found
  
  @throws CmsException if something goes wrong