package tools;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class Copy {
/**
* ファイルをコピーする
*
* @param source
* @param dest
* @throws IOException
*/
public static void copyFile(File source, File dest) throws IOException {
Path sourcePath = Paths.get(source.getAbsolutePath());
Path targetPath = Paths.get(dest.getAbsolutePath());
Files.copy(sourcePath, targetPath);
}
}