| | |
| | | for (File file : files) { |
| | | if(file.isDirectory()){ //先判断是不是文件夹 |
| | | delDir(file.getPath()); |
| | | } |
| | | else{ //这样就覆盖到了删除失效的软链接情况 |
| | | }else{ //这样就覆盖到了删除失效的软链接情况 |
| | | file.delete(); |
| | | } |
| | | } |
| | | //删除最后的文件夹 |
| | | Files.delete(dirPath); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | fileList.add(new File("D:/Java/jdk1.7.0_45_64bit/bin/java.exe")); |
| | | FileOutputStream fos2 = new FileOutputStream(new File("c:/mytest02.zip")); |
| | | ZipUtils.toZip(fileList, fos2);*/ |
| | | delDir("D:\\IDEAWorkSpace\\CadDrawManager\\target\\downLoad"); |
| | | delDir("D:\\IDEAWorkSpace\\CadDrawManager\\target\\IDCE-6006NTpro"); |
| | | } |
| | | } |