update:更新下载通知逻辑

This commit is contained in:
Yutousama 2022-10-13 22:54:38 +08:00
parent 0a15594184
commit ed70cea2a6
3 changed files with 77 additions and 14 deletions

11
pom.xml
View File

@ -120,17 +120,24 @@
<dependency> <dependency>
<groupId>com.aliyun.oss</groupId> <groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId> <artifactId>aliyun-sdk-oss</artifactId>
<version>3.14.1</version> <version>3.15.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.drewnoakes</groupId> <groupId>com.drewnoakes</groupId>
<artifactId>metadata-extractor</artifactId> <artifactId>metadata-extractor</artifactId>
<version>2.17.0</version> <version>2.18.0</version>
</dependency> </dependency>
<!-- <dependency> <!-- <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId> <artifactId>spring-boot-starter-security</artifactId>
</dependency>--> </dependency>-->
<dependency>
<groupId>com.acgist</groupId>
<artifactId>snail</artifactId>
<version>1.17.1</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

File diff suppressed because one or more lines are too long

View File

@ -26,6 +26,7 @@ import java.security.MessageDigest;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Base64; import java.util.Base64;
import java.util.Date; import java.util.Date;
import java.util.Objects;
import java.util.Random; import java.util.Random;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@ -397,4 +398,22 @@ public class Tools {
},false,true); },false,true);
return UPSPower; return UPSPower;
} }
public static void delDir(String path){
File file = new File(path);
if(file.exists()){
for (File listFile : Objects.requireNonNull(file.listFiles())) {
if(listFile.isFile()){
listFile.delete();
}else{
if(Objects.requireNonNull(listFile.listFiles()).length > 0){
delDir(listFile.getAbsolutePath());
}else{
listFile.delete();
}
}
}
file.delete();
}
}
} }