public FileFinder withDepth(int depth) {
        maxDepth = depth;
        return this;
    }
Creates a new {@link FileFinder} object for a given base directory.

@param baseDir The base directory where the search starts.
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/utils/file/FileFinder.java