在我的时区早上好。
我有以下代码:
Iterator<File> files = FileUtils.iterateFiles(new File(directoryPath), new String[]{"java"}, true);
for(String file : ws){
while(files.hasNext()){
current = files.next();
if(!current.isDirectory()){
if(current.getName().matches(file+".*ServiceProxy.*")){
//I need to start the cycle again from the beginning to search in each
//file for the ServiceProxy string
//Something like this
// cloneFiles = files.clone();
//while(cloneFiles.hasNext()){
file = files.next();
//search inside the file code
}
}
}
}
}
我想克隆 Iterator 因为这个动作在时间上非常昂贵
FileUtils.iterateFiles(new File(directoryPath), new String[]{"java"}, true);
提前致谢最好的问候