验证文件名 @param fileName 文件名称 @return @throws Exception
(String fileName)
| 285 | * @throws Exception |
| 286 | */ |
| 287 | public static boolean validateFileName(String fileName){ |
| 288 | return fileName.matches("^[^\\/\\<>\\*\\?\\:\"\\|\\%]+$"); |
| 289 | } |
| 290 | /** |
| 291 | * 获取文件名,不包含后缀 |
| 292 | * @param path 路径 |