建立多级文件夹
// 創建多級文件夾
public static void createDirectory(String path) throws Exception {
if (StringUtils.isNullOrEmpty(path)) {
return;
}
try {
// 獲得文件對象
File f = new File(path);
if (!f.exists()) {
// 如果路徑不存在,則創建
f.mkdirs();
}
} catch (Exception e) {
throw e;
}
}
轉載于:https://www.cnblogs.com/haorun/p/6127026.html
總結
- 上一篇: 增强:MB1A物料价格检查
- 下一篇: 【BZOJ-4245】OR-XOR