Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用以下代码返回扩展名为“.mp4”的目录中的文件。
我想调整代码,使其返回具有 .mp4 扩展名但在文件名的其余部分不包含字符串“temp”的文件
final String[] vids = dir.list(new FilenameFilter() { public boolean accept(File dir, String name) { return name.endsWith(".mp4"); } });
return name.endsWith(".mp4") && !name.contains("temp");