更新时间:2023-12-03 23:28:04
您可以把所有的文件目录下,成为一个收集和遍历它:
You could put all files under the dir into a collection and iterate over it:
File[] files = dir.listFiles();
for (File f : files) {
Runtime.getRuntime().exec("cat "+dir.getAbsolutePath()+File.separator+f.getName());
}