管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-11-01 7e6fd5f1a403618d9d2116c483783951e17a3509
src/main/java/com/lf/server/helper/PathHelper.java
@@ -81,16 +81,16 @@
    }
    /**
     * 获取导入目录
     * 获取下载完整目录
     */
    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);
@@ -99,7 +99,7 @@
    }
    /**
     * 获取上传目录
     * 获取上传完整目录
     */
    public String getUploadFullPath() {
        uploadPath = getSubPath(config.getUploadPath(), uploadPath);
@@ -108,7 +108,7 @@
    }
    /**
     * 获取共享目录
     * 获取共享完整目录
     */
    public String getShareFullPath() {
        sharePath = getSubPath(config.getSharePath(), sharePath);
@@ -151,31 +151,10 @@
                    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();
    }
}