|
@@ -315,7 +315,7 @@ public class ExcelUtil {
|
|
File dir = new File(outputDirPath);
|
|
File dir = new File(outputDirPath);
|
|
for (File file : dir.listFiles()) {
|
|
for (File file : dir.listFiles()) {
|
|
logger.info(file.getAbsolutePath());
|
|
logger.info(file.getAbsolutePath());
|
|
- fileList.add(file.getAbsolutePath());
|
|
|
|
|
|
+ fileList.addAll(fileList(file));
|
|
}
|
|
}
|
|
}catch (Exception e1){
|
|
}catch (Exception e1){
|
|
logger.error(e.getMessage(),e1);
|
|
logger.error(e.getMessage(),e1);
|
|
@@ -324,6 +324,26 @@ public class ExcelUtil {
|
|
return fileList;
|
|
return fileList;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private static List<String> fileList(File file){
|
|
|
|
+ List<String> fileList = new ArrayList<>();
|
|
|
|
+ if(file.isDirectory()){
|
|
|
|
+ File[] files = file.listFiles();
|
|
|
|
+ for (File file1 : files) {
|
|
|
|
+ System.out.println(file1.getAbsolutePath());
|
|
|
|
+ if(file1.isDirectory()){
|
|
|
|
+ List<String> dirFileList = fileList(file1);
|
|
|
|
+ fileList.addAll(dirFileList);
|
|
|
|
+ }else{
|
|
|
|
+ fileList.add(file1.getAbsolutePath());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ fileList.add(file.getAbsolutePath());
|
|
|
|
+ System.out.println(file.getAbsolutePath());
|
|
|
|
+ }
|
|
|
|
+ return fileList;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 解压RAR文件
|
|
* 解压RAR文件
|
|
* @param rarFilePath RAR文件路径
|
|
* @param rarFilePath RAR文件路径
|