directory

master
admin 2 years ago
parent 410a392786
commit 6011fd9b1b

@ -563,11 +563,7 @@ public class IdcServiceImpl implements IdcService {
map.put("taskId", json.get("messageId"));
map.put("cacheFilePath", fileName);
map.put("status", success ? "1" : "0");
if(isUpload) {
saveUploadStatus(map);
} else {
saveExportStatus(map);
}
saveExportStatus(map);
}

@ -1,5 +1,6 @@
package com.glxp.api.idc.utils;
import java.io.File;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
@ -108,5 +109,24 @@ public class IDCUtils {
}
return date;
}
public static void createDirectory(String directory) {
String dir = directory;
String path ="";
String[] breakChar ={"\\","/"};
for(String bk:breakChar) {
while(dir.indexOf(bk)>-1) {
path+=dir.substring(0,dir.indexOf(bk))+"\\";
File file = new File(path);
if (!(new File(path)).exists()) {
(new File(path)).mkdir();
}
if (dir.length()>dir.indexOf(bk)) {
dir = dir.substring(dir.indexOf(bk) +1);
} else {
dir = "";
}
}
}
}
}

Loading…
Cancel
Save