class FileUtil {

    public static List<File> getFileList(String path) {
        List<File> list = new ArrayList<>();
        File dir = new File(path);
        File[] files = dir.listFiles();
        if (files != null) {
            for (int i = 0; i < files.length; i++) {
                if (files[i].isDirectory()) {
                    list.addAll(getFileList(files[i].getAbsolutePath()));
                } else {
                    list.add(files[i]);
                }
            }
        }
        return list;
    }

}