hexo
摘要: 方法1//使用lastIndexOf()结合subString()获取后缀名 public String lastName(File file){ if(file==null) return null; String filename = file.getName(); if(filename.la 阅读全文
posted @ 2021-12-20 11:38 坚强的南瓜 阅读(4385) 评论(1) 推荐(0)
摘要: public static void getFileName() { String path = "F:/测试目录"; // 路径 File f = new File(path);//获取路径 F:\测试目录 if (!f.exists()) { System.out.println(path + 阅读全文
posted @ 2021-12-20 11:36 坚强的南瓜 阅读(1989) 评论(1) 推荐(1)