import java.util.ArrayList
public class FileSystem1 {
private static ArrayList filelist = new ArrayList()
public static void main(String[] args) {
long a = System.currentTimeMillis()
refreshFileList("c:\\java")
System.out.println(System.currentTimeMillis() - a)
}
public static void refreshFileList(String strPath) {
File dir = new File(strPath)
File[] files = dir.listFiles()
if (files == null) return
for (int i = 0i <files.lengthi++) {
if (files[i].isDirectory()) {
refreshFileList(files[i].getAbsolutePath())
}
else
{ String strFileName = files[i].getAbsolutePath().toLowerCase()
System.out.println("---"+strFileName)
filelist.add(files[i].getAbsolutePath())
}
}
}
}
或者 你可以用java 调用微软cmd命令 用java来接收返回的结果
if ($kind != 'ReplyTo') {if (!isset($this->all_recipients[strtolower($address)])) {
array_push($this->$kind, array($address, $name))
$this->all_recipients[strtolower($address)] = true
return true
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)