管道基础大数据平台系统开发-【后端】-Server
Surpriseplus
2022-10-14 2fc49d5064ecd0f8ba8166d0f6644bdadcb81ccc
src/main/java/com/lf/server/helper/FileHelper.java
@@ -11,9 +11,6 @@
    /**
     * 获取文件扩展名
     *
     * @param file 文件
     * @return
     */
    public static String getExtension(File file) {
        if (file == null) {
@@ -30,6 +27,21 @@
        return fileName.substring(idx);
    }
    /**
     * 获取文件扩展名
     */
    public static String getExtension(String fileName) {
        if (StringHelper.isEmpty(fileName)) {
            return "";
        }
        int idx = fileName.lastIndexOf(POINT);
        if (idx == -1) {
            return "";
        }
        return fileName.substring(idx).toLowerCase();
    }
    /**
     * 获取多用途互联网邮件扩展类型