code: public static boolean isDescendantOrEqual(String path, String descendant)
     {
        if (path.equals(descendant))
        {
           return true;
        }
        else
        {
           String pattern = path.endsWith("/") ? path : path + "/";
           return descendant.startsWith(pattern);
        }
     }
docs: Determines if the <code>descendant</code> path is hierarchical a descendant of
  <code>path</code> or equal to it.
  
  @param path
  the path to check
  @param descendant
  the potential descendant
  @return <code>true</code> if the <code>descendant</code> is a descendant or equal;
  <code>false</code> otherwise.