Commit dff8524b authored by wangqiang's avatar wangqiang

删除卷内临时文件

parent 698b0388
......@@ -330,7 +330,7 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
public String fillWordAndConvertPdf(String modelName, Map<String, Object> dataMap, String pdfFileName) {
String targetPath = System.getProperty("user.dir") + "/TEMP/";
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 {
InputStream tempStream2 = Files.newInputStream(wordFile.toPath());
OutputStream outputStream = Files.newOutputStream(pdfFile2.toPath());
......@@ -410,7 +410,7 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
extFilesVO.setOperator(OperatorType.MODIFY);
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