k**e 发帖数: 86 | 1 You can create a method referring to the below code, then
call this method recursively:
File currentDir = new File(String yourDir);
String[] subDirs = currentDir.list(new FilenameFilter(){
public boolean accept(File dir, String name)
{
// add your code here
/*
File tmpFile = new File(name);
return tmpFile.isDirectory();
*/
}
}); |
|