在java 7 中文件移动复制简单方法

文件移动

Path source=Paths.get("D:\\sa\\123.txt");
Path target=Paths.get("D:\\lb\\en\\124.txt");
Files.move(source, target);

文件复制

Files.copy(source, target);

 

posted on 2016-12-22 15:10  ALT_LB  阅读(142)  评论(0编辑  收藏  举报