|
@@ -137,7 +137,7 @@ public class QiniuService {
|
|
|
//File file = new File("d://222.jpg");
|
|
//File file = new File("d://222.jpg");
|
|
|
//getFiles("D:\\code\\mrxu-res\\src\\main\\webapp\\res\\haotianlai\\res");
|
|
//getFiles("D:\\code\\mrxu-res\\src\\main\\webapp\\res\\haotianlai\\res");
|
|
|
//System.out.println(upload(file,null));
|
|
//System.out.println(upload(file,null));
|
|
|
- getFile(new File("D:\\test\\mrxu-res\\src\\main\\webapp\\res\\easyweb\\assets\\module\\iconPicker.js"));
|
|
|
|
|
|
|
+ getFiles("/Users/jsonxu/code/mrxu/mrxu-manager/src/main/resources/static/cms");
|
|
|
System.out.println("执行完成!");
|
|
System.out.println("执行完成!");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -157,8 +157,8 @@ public class QiniuService {
|
|
|
|
|
|
|
|
public static void getFile(File file) {
|
|
public static void getFile(File file) {
|
|
|
String fileName = file.getAbsolutePath();
|
|
String fileName = file.getAbsolutePath();
|
|
|
- int index = fileName.indexOf("\\webapp\\res\\");
|
|
|
|
|
- fileName = "V1/"+fileName.substring(index+8, fileName.length()).replaceAll("\\\\", "/");
|
|
|
|
|
|
|
+ int index = fileName.indexOf("/resources/static");
|
|
|
|
|
+ fileName = "V2/"+fileName.substring(index+18, fileName.length()).replaceAll("\\\\", "/");
|
|
|
//TODO delete
|
|
//TODO delete
|
|
|
//fileName = fileName.replace("V1/res/panh/", "");
|
|
//fileName = fileName.replace("V1/res/panh/", "");
|
|
|
delete(fileName);
|
|
delete(fileName);
|