code: public static boolean hasChildren(CmsObject cms, CmsResource resource) throws CmsException {
  
          return !cms.getResourcesInFolder(cms.getSitePath(resource), CmsResourceFilter.ALL).isEmpty();
      }
docs: Checks whether the given resource has any children.<p>
  
  @param cms the CMS context
  @param resource the resource to check
  
  @return true if the resource has children
  
  @throws CmsException if something goes wrong