用户登录
用户注册

分享至

递归搜索Java中的目录

  • 作者: 鵞奀昆勥
  • 来源: 51数据库
  • 2022-12-19

问题描述

在 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参考

软件
前端设计
程序设计
Java相关