public static List<File> getDirectoryFilesRecursive(String directoryPath,
                                                        int maxDepth) throws FileNotFoundException {

        URL url = ResourceUtils.class.getClassLoader().getResource(directoryPath);
        if (url == null) {
            throw new FileNotFoundException("path not found: " + directoryPath);
        }
        List<File> fileList = new ArrayList<>();
        return getDirectoryFilesRecursive(url.getPath(), fileList, maxDepth);
    }
@param directoryPath the directory path
@param maxDepth      the max directory depth to get the files, the given directory is 0 as the tree root
@return all normal files which in this directory and subDirectory according to the maxDepth
@throws FileNotFoundException the directory not exist in the given path
oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/ResourceUtils.java