### Question:
FileUtil { public static List<File> getFiles(String path){ File root = new File(path); List<File> files = new ArrayList<File>(); if(!root.isDirectory()){ files.add(root); }else{ File[] subFiles = root.listFiles(); for(File f : subFiles){ files.addAll(getFiles(f.getAbsolutePath())); } } return files; }  static List<File> getFiles(String path);  }### Answer:
@Test public void getFiles() throws Exception { List<File> files= FileUtil.getFiles("D:\\11111\\template\\base\\NsomsBbCompany"); for (File file: files) { System.out.println(">>>>>>>>>>>>>>"+file.toPath()); } }