MCPcopy Create free account
hub / github.com/diyhi/bbs / validateFileName

Method validateFileName

src/main/java/cms/utils/FileUtil.java:287–289  ·  view source on GitHub ↗

验证文件名 @param fileName 文件名称 @return @throws Exception

(String fileName)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

matchesMethod · 0.65

Tested by

no test coverage detected