private void walkSuitableFiles(Collection<File> suitableFiles, File file, int maxNum) {
        if (suitableFiles.size() > maxNum) {
            LOGGER.warn("Suitable files exceed max num {}, just return.", maxNum);
            return;
        }

        if (suitable(file.getAbsolutePath())) {
            if (file.isFile()) {
                suitableFiles.add(file);
            } else if (file.isDirectory()) {
                Stream.of(file.listFiles()).forEach(subFile -> walkSuitableFiles(suitableFiles, subFile, maxNum));
            }
        }
    }
Research all children files with {@link PathPattern#rootDir} matched whiteList and filtered by blackList.

@param maxNum
@return
inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/task/PathPattern.java