private static List<String> walkFileTree(Path rootDir, String pathMatcherStr, ClientLogger logger) {
        final PathMatcher pathMatcher = FileSystems.getDefault().getPathMatcher(pathMatcherStr);

        // TODO: Exclude known heavy directories like .git
        List<String> filePaths = new ArrayList<>();
        try {
            Files.walkFileTree(rootDir, new SimpleFileVisitor<>() {
                @Override
                public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException {
                    if (pathMatcher.matches(path)) {
                        filePaths.add(decodeURL(path.toUri().toString()));
                    }
                    return FileVisitResult.CONTINUE;
                }

                @Override
                public FileVisitResult visitFileFailed(Path file, IOException exception) throws IOException {
                    return FileVisitResult.CONTINUE;
                }
            });
        } catch(IOException ex) {
            logger.error("IOException caught when walking file tree: " + ex.getMessage());
        }

        return filePaths;
    }
Searches among the parents for a directory named "schemas"
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/common/FileUtils.java