code: public String getParentFolder(Object obj) {
  
          String result;
          if (obj instanceof CmsResource) {
              result = CmsResource.getParentFolder(m_cms.getRequestContext().getSitePath((CmsResource)obj));
          } else {
              result = CmsResource.getParentFolder(String.valueOf(obj));
          }
          return result;
      }
docs: Returns the parent folder of a resource.<p>
  
  This assumes the parameter is either a CmsResource, or a String representing a file name.
  If the parameter is a CmsResource, the result will be relative to the current site.</p>
  
  @return the parent folder of a resource
  
  @param obj a CmsResource or a String representing a resource name
  
  @see CmsResource#getParentFolder(String)
  @see org.opencms.jsp.CmsJspResourceWrapper#getSitePathParentFolder()