遍历
public static void QueLink(String path) {
File file = new File(path);
Queue<File> queue = new LinkedList<File>();
queue.offer(file);
while (!queue.isEmpty()) {
File file2 = queue.poll();
if (file2.isDirectory()) {
File[] fs = file2.listFiles();
for (int i = 0; i < fs.length; i++) {
queue.offer(fs[i]);
}
System.out.println(file2.getName()+"---"+file2.getAbsoluteFile()+"***"+file2.getAbsolutePath());
}
else {
//System.err.println(file2.getName());
}
}
}

浙公网安备 33010602011771号