|
@@ -56,6 +56,10 @@ public class ArchiveUtil {
|
|
|
return StrUtil.isNotBlank(fileName) && (fileName.endsWith("zip") || fileName.endsWith("ZIP"));
|
|
|
}
|
|
|
|
|
|
+ public static boolean is7z(String fileName) {
|
|
|
+ return StrUtil.isNotBlank(fileName) && (fileName.endsWith("7z") || fileName.endsWith("7Z"));
|
|
|
+ }
|
|
|
+
|
|
|
public static boolean isRAR(String fileName) {
|
|
|
return StrUtil.isNotBlank(fileName) && (fileName.endsWith("rar") || fileName.endsWith("RAR"));
|
|
|
}
|
|
@@ -352,8 +356,8 @@ public class ArchiveUtil {
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
- String zipFilePath = "D:\\home\\wwwroot\\mo_report_file\\wangzaijun@simuwang.com\\20250321\\20250321143709排排网确认单.rar";
|
|
|
- String destFilePath = "D:\\home\\wwwroot\\mo_report_file\\wangzaijun@simuwang.com\\20250321";
|
|
|
+ String zipFilePath = "D:\\Documents\\新报告解析\\基协报告\\排排网代销-宏锡5月报告(公司及协会版).7z";
|
|
|
+ String destFilePath = "D:\\Documents\\新报告解析\\基协报告\\rar";
|
|
|
List<String> strings = extractRar5(zipFilePath, destFilePath);
|
|
|
for (String string : strings) {
|
|
|
System.out.println(string);
|
|
@@ -363,8 +367,8 @@ public class ArchiveUtil {
|
|
|
// System.out.println(s);
|
|
|
// }
|
|
|
|
|
|
- String currentZip = "D:\\Documents\\新报告解析\\确认单\\20250514_份额及交易确认函_上海量魁私募基金管理有限公司_深圳市前海排排网基金销售有限责任公司_TA确认数据.zip";
|
|
|
- List<String> files = decompressZip(currentZip, "D:\\Documents\\新报告解析\\确认单\\", 2, "utf-8");
|
|
|
+ String currentZip = "D:\\Documents\\新报告解析\\基协报告\\排排网代销-宏锡5月报告(公司及协会版).7z";
|
|
|
+ List<String> files = decompressZip(currentZip, "D:\\Documents\\新报告解析\\基协报告\\zip\\", 2, "utf-8");
|
|
|
System.out.println("解压后的文件路径:");
|
|
|
files.forEach(System.out::println);
|
|
|
}
|