public static Long getFileLineNumberFromDir(@NonNull String dirPath) {
        File file = new File(dirPath);
        if (file.isDirectory()) {
            File[] files = file.listFiles();
            if (files == null) {
                return 0L;
            }
            return Arrays.stream(files)
                    .map(
                            currFile -> {
                                if (currFile.isDirectory()) {
                                    return getFileLineNumberFromDir(currFile.getPath());
                                } else {
                                    return getFileLineNumber(currFile.getPath());
                                }
                            })
                    .mapToLong(Long::longValue)
                    .sum();
        }
        return getFileLineNumber(file.getPath());
    }
@Test
    public void testGetFileLineNumberFromDir() throws Exception {
        String rootPath = "/tmp/test/file_utils1";
        String dirPath1 = rootPath + "/dir1";
        String dirPath2 = rootPath + "/dir2";

        String file1 = dirPath1 + "/file1.txt";
        String file2 = dirPath1 + "/file2.txt";
        String file3 = dirPath2 + "/file3.txt";
        String file4 = dirPath2 + "/file4.txt";

        file1 = file1.replace("/", File.separator);
        file2 = file2.replace("/", File.separator);
        file3 = file3.replace("/", File.separator);
        file4 = file4.replace("/", File.separator);

        FileUtils.createNewFile(file1);
        FileUtils.createNewFile(file2);
        FileUtils.createNewFile(file3);
        FileUtils.createNewFile(file4);

        writeTestDataToFile(file1);
        writeTestDataToFile(file2);
        writeTestDataToFile(file3);
        writeTestDataToFile(file4);

        Long lines = FileUtils.getFileLineNumberFromDir(rootPath);
        Assertions.assertEquals(100 * 4, lines);
    }