0
我需要爲一個文件夾移動到另一個文件如何將文件從一個文件夾移動到另一個文件夾?
在Java中做到這一點,我將創建一個方法是這樣的:
private boolean moveFile(List<String> names, dir moveTo){
for(String file : names){
//copy the file from one dir to another
}
}
是否有更多的「功能」的方式在斯卡拉或做到這一點更好的方法?也許使用scala我甚至不需要遍歷文件?