| | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.FileOutputStream; |
| | | import java.io.IOException; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | |
| | | |
| | | static List<String> wlist= Arrays.asList(youxiaoList); |
| | | |
| | | static String targetFilePath = "/mnt/sdc/webresource"; |
| | | static String targetFilePath = "C:\\Users\\Administrator\\Desktop\\webresource"; |
| | | |
| | | |
| | | public static void main(String[] args) throws IOException { |
| | |
| | | |
| | | if(file2.getAbsolutePath().contains("weiqi.web.jyymatrix.cc") |
| | | && wlist.stream().anyMatch(item->item.equals(file2.getName())) ){ |
| | | System.out.println("删除视频文件:" + file2.getAbsolutePath()); |
| | | file2.delete(); |
| | | /* System.out.println("移动视频文件:" + file2.getAbsolutePath()); |
| | | |
| | | System.out.println("移动视频文件:" + file2.getAbsolutePath()); |
| | | FileInputStream in=new FileInputStream(file2); |
| | | FileOutputStream out=new FileOutputStream(new File("/mnt/sdc/webresource/vidos/"+file2.getName())); |
| | | FileOutputStream out=new FileOutputStream(new File("C:\\Users\\Administrator\\Desktop\\webresource\\vidos\\"+file2.getName())); |
| | | byte[] buff=new byte[1024]; |
| | | int length=in.read(buff); |
| | | while (length>0){ |
| | |
| | | length=in.read(buff); |
| | | } |
| | | out.close(); |
| | | in.close();*/ |
| | | in.close(); |
| | | }else if(file2.getAbsolutePath().contains("weiqi.web.jyymatrix.cc") |
| | | && !wlist.stream().anyMatch(item->item.equals(file2.getName())) ){ |
| | | System.out.println("删除视频文件:" + file2.getAbsolutePath()); |
| | | file2.delete(); |
| | | // System.out.println("删除视频文件:" + file2.getAbsolutePath()); |
| | | //file2.delete(); |
| | | } |
| | | } else { |
| | | |