| | |
| | | } |
| | | |
| | | /** |
| | | * 获取导入目录 |
| | | * 获取下载完整目录 |
| | | */ |
| | | public String getImportFullPath() { |
| | | public String getDownloadFullPath() { |
| | | downloadPath = getSubPath(config.getDownloadPath(), downloadPath); |
| | | |
| | | return config.getDownloadPath() + File.separator + downloadPath; |
| | | } |
| | | |
| | | /** |
| | | * 获取出图目录 |
| | | * 获取出图完整目录 |
| | | */ |
| | | public String getExportFullPath() { |
| | | exportPath = getSubPath(config.getExportPath(), exportPath); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取上传目录 |
| | | * 获取上传完整目录 |
| | | */ |
| | | public String getUploadFullPath() { |
| | | uploadPath = getSubPath(config.getUploadPath(), uploadPath); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取共享目录 |
| | | * 获取共享完整目录 |
| | | */ |
| | | public String getShareFullPath() { |
| | | sharePath = getSubPath(config.getSharePath(), sharePath); |
| | |
| | | continue; |
| | | } |
| | | |
| | | deleteFiles(f); |
| | | FileHelper.deleteFiles(f); |
| | | } |
| | | } catch (Exception ex) { |
| | | log.error(ex.getMessage(), ex); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 级联删除文件 |
| | | */ |
| | | public void deleteFiles(File file) { |
| | | if (file == null || !file.exists()) { |
| | | return; |
| | | } |
| | | |
| | | if (file.isDirectory()) { |
| | | File[] files = file.listFiles(); |
| | | for (File f : files) { |
| | | if (f.isDirectory()) { |
| | | deleteFiles(f); |
| | | } else { |
| | | f.delete(); |
| | | } |
| | | } |
| | | } |
| | | file.delete(); |
| | | } |
| | | } |