递归地搜索Java中的目录 [英] Recursively search for a directory in Java

查看:130
本文介绍了递归地搜索Java中的目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Java中找到具有特定名称的目录的最佳方法是什么?我正在寻找的目录可以位于当前目录或其一个子目录中。

解决方案

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



java.io.File API参考


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.

解决方案

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

java.io.File API reference

这篇关于递归地搜索Java中的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆