20个非常有用的Java程序片段(2)计算机等级考试
文章作者 100test 发表时间 2010:01:01 12:30:10
来源 100Test.Com百考试题网
14. 列出文件和目录
Java代码
File dir = new File("directoryName").
String[] children = dir.list().
if (children == null) {
// Either dir does not exist or is not a directory
} else {
for (int i=0. i