浏览代码

增加rar加压缩工具

dengsixing 2 年之前
父节点
当前提交
009739d884
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      4dkankan-utils-model/src/main/java/com/fdkankan/model/utils/CreateObjUtil.java

+ 7 - 0
4dkankan-utils-model/src/main/java/com/fdkankan/model/utils/CreateObjUtil.java

@@ -59,6 +59,13 @@ public class CreateObjUtil {
 		log.info("解压rar完毕:" + command);
 		log.info("解压rar完毕:" + command);
 	}
 	}
 
 
+	public static void unRarWithPath(String rarPath,String dataPath) throws Exception{
+		log.info("解压rar开始");
+		String command = "unrar x " + rarPath + " " + dataPath;
+		callshell(command);
+		log.info("解压rar完毕:" + command);
+	}
+
 	public static void unZip(String zipPath,String dataPath) throws Exception{
 	public static void unZip(String zipPath,String dataPath) throws Exception{
 		log.info("解压zip开始");
 		log.info("解压zip开始");
 		String command = "unzip -O GBK/GB18030CP936 " + zipPath + " -d " + dataPath;
 		String command = "unzip -O GBK/GB18030CP936 " + zipPath + " -d " + dataPath;