public static Path deepestNonGlobPath(Path input) {
    Path commonRoot = input;

    while (commonRoot != null && isGlob(commonRoot)) {
      commonRoot = commonRoot.getParent();
    }
    return commonRoot;
  }
public static Path deepestNonGlobPath ( Path input ) { Path commonRoot = input ; while ( commonRoot != null && isGlob ( commonRoot ) ) { commonRoot = commonRoot . getParent ( ) ; } return commonRoot ; }
Finds the deepest ancestor of input that is not a glob.