From 8174eac8d8a35e70487353514dc0d09cecb9a200 Mon Sep 17 00:00:00 2001 From: liujun Date: Mon, 26 Feb 2024 15:31:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=BC=93=E5=AD=98=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/zcloud/util/Warden.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/zcloud/util/Warden.java b/src/main/java/com/zcloud/util/Warden.java index 7163ff0a..701953a5 100644 --- a/src/main/java/com/zcloud/util/Warden.java +++ b/src/main/java/com/zcloud/util/Warden.java @@ -384,6 +384,11 @@ public class Warden { zipOut.write(buffer, 0, len); } fileInputStream.close(); + // 删除文件 + boolean isDelete = file.delete(); + if (isDelete){ + System.out.println("删除文件成功"); + } } zipOut.flush(); zipOut.closeEntry();