private void extractAll(String dirpath, int currentDeepth)
{
int deepth = currentDeepth;
System.err.println("deepth = " + deepth);
if(deepth > config.searchDeepth)
{
System.out.println("deepth > config.searchDeepth , return ");
return;
}
File dir = new File(dirpath);
File[] files = dir.listFiles();
for(int i= 0; i < files.length;i++)
{
if(files[i].isDirectory())
{
System.err.println(files[i].getAbsolutePath());
if(files[i].getName().equals("res"))
{
//ExcelWriter excelWriter = new ExcelWriter();
//excelWriter.write(new XMLReader().read(dirpath));
System.out.println("read res dir");
// return ;
}
extractAll(files[i].getAbsolutePath(), deepth + 1);
}
}
}
转载于:https://my.oschina.net/lifj/blog/74073