正在显示
1 个修改的文件
包含
9 行增加
和
7 行删除
| @@ -257,8 +257,8 @@ public class FileUtils | @@ -257,8 +257,8 @@ public class FileUtils | ||
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | /** | 259 | /** |
| 260 | - * 获取名称 | ||
| 261 | - * 例如: /profile/upload/2022/04/16/ruoyi.png, 返回: ruoyi.png | 260 | + * 获取文件名称 /profile/upload/2022/04/16/ruoyi.png -- ruoyi.png |
| 261 | + * | ||
| 262 | * @param fileName 路径名称 | 262 | * @param fileName 路径名称 |
| 263 | * @return 没有文件路径的名称 | 263 | * @return 没有文件路径的名称 |
| 264 | */ | 264 | */ |
| @@ -275,13 +275,15 @@ public class FileUtils | @@ -275,13 +275,15 @@ public class FileUtils | ||
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | /** | 277 | /** |
| 278 | - * 获取名称 | ||
| 279 | - * 例如: /profile/upload/2022/04/16/ruoyi.png, 返回: ruoyi | 278 | + * 获取不带后缀文件名称 /profile/upload/2022/04/16/ruoyi.png -- ruoyi |
| 279 | + * | ||
| 280 | * @param fileName 路径名称 | 280 | * @param fileName 路径名称 |
| 281 | - * @return 没有文件路径的名称 | 281 | + * @return 没有文件路径和后缀的名称 |
| 282 | */ | 282 | */ |
| 283 | - public static String getNameNotSuffix(String fileName) { | ||
| 284 | - if (fileName == null) { | 283 | + public static String getNameNotSuffix(String fileName) |
| 284 | + { | ||
| 285 | + if (fileName == null) | ||
| 286 | + { | ||
| 285 | return null; | 287 | return null; |
| 286 | } | 288 | } |
| 287 | String baseName = FilenameUtils.getBaseName(fileName); | 289 | String baseName = FilenameUtils.getBaseName(fileName); |
-
请 注册 或 登录 后发表评论