Commit dff8524b authored by wangqiang's avatar wangqiang

删除卷内临时文件

parent 698b0388
...@@ -330,7 +330,7 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic ...@@ -330,7 +330,7 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
public String fillWordAndConvertPdf(String modelName, Map<String, Object> dataMap, String pdfFileName) { public String fillWordAndConvertPdf(String modelName, Map<String, Object> dataMap, String pdfFileName) {
String targetPath = System.getProperty("user.dir") + "/TEMP/"; String targetPath = System.getProperty("user.dir") + "/TEMP/";
File wordFile = new File(targetPath + modelName); File wordFile = new File(targetPath + modelName);
File pdfFile2 = new File("TEMP/JNDir/" + pdfFileName + "_" + UUID.randomUUID() + ".pdf"); File pdfFile2 = new File("TEMP/JNDir/" + pdfFileName + ".pdf");
try { try {
InputStream tempStream2 = Files.newInputStream(wordFile.toPath()); InputStream tempStream2 = Files.newInputStream(wordFile.toPath());
OutputStream outputStream = Files.newOutputStream(pdfFile2.toPath()); OutputStream outputStream = Files.newOutputStream(pdfFile2.toPath());
...@@ -410,7 +410,7 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic ...@@ -410,7 +410,7 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
extFilesVO.setOperator(OperatorType.MODIFY); extFilesVO.setOperator(OperatorType.MODIFY);
this.saveRecursion((V) extFilesVO); this.saveRecursion((V) extFilesVO);
//删除目录下所有的文件 //删除目录下所有的文件
FileUtils.deleteDirectory("TEMP/JNDir/"); FileUtils.deleteFilesInDirectory(System.getProperty("user.dir") + "TEMP/JNDir/");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment