public static long getFileLastModifyTime(String fileName) {
        long lastModify = 0L;
        try {
            lastModify = Files.getLastModifiedTime(Paths.get(fileName)).toMillis();
        } catch (IOException e) {
            LOGGER.error("getFileLastModifyTime error.", e);
        }
        return lastModify;
    }
Finds files or sub directories within a given base directory.

@param baseDirectory A path as {@link File} object to search within.
@return A {@link FileFinder} object to specify the search parameters using a builder
        pattern.
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/utils/file/FileUtils.java