拷貝文件
Files.copy(Paths.get(fromFile.getPath()),Paths.get(toFile.getPath()), LinkOption.NOFOLLOW_LINKS);
移動文件
boolean isRename = fromFile.renameTo(toFile);
if(!isRename){
throw new Exception("文件移動失敗!\n");
}
刪除文件
boolean isDelete = toFile.delete();
if (!isDelete) {
throw new Exception("文件刪除失敗!");
}