public String lastPathComponent() {
            if (path.length == 0) {
                return "/";
            } else {
                return path[path.length - 1];
            }
        }
Visits metadata paths based on a glob string.
shell/src/main/java/org/apache/kafka/shell/glob/GlobVisitor.java