递归搜索Java中的目录

2022-01-20 00:00:00 directory find search java

在 Java 中查找具有特定名称的目录的最佳方法是什么?我要查找的目录可以位于当前目录或其子目录之一中.

What is the best way to find a directory with a specific name in Java? The directory that I am looking for can be located either in the current directory or one of its subdirectories.

推荐答案

您的解决方案将包括使用 File.listFiles(String)

Your solution will include the use of File.listFiles(String)

java.io.File API参考

相关文章