51,396
社区成员




/**
* 复制单个文件
*
* @param oldPath String 原文件路径
* @param newPath String 复制后路径
* @return boolean
*/
public static boolean moveFile(String oldPath, String newPath) throws IOException {
File startFile = new File(oldPath);
File file = new File(newPath);
if (file.exists()) {
return true;
}
return startFile.renameTo(file);
}