ファイルをコピーする。
コピー先に同名ファイルがあれば置き換える
----------------------------------------------------------------------------
public static boolean copyFile(String srcPath,String destPath){
if(srcPath==null || srcPath.equals("")) {
return false;
}
if(destPath==null || destPath.equals("")) {
return false;
}
try {
// コピー先に同名ファイルがあれば、置き換え
Files.copy(Paths.get(srcPath), Paths.get(destPath), StandardCopyOption.REPLACE_EXISTING);
} catch (IOException e) {
e.printStackTrace();
}
return false;
}