Mercurial Hosting > luan
diff src/goodjava/io/IoUtils.java @ 1661:08177ced7fa0
add file.copy_to
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 02 May 2022 18:56:55 -0600 |
parents | 736ec76bbf42 |
children | 2dbcc8360a3e |
line wrap: on
line diff
--- a/src/goodjava/io/IoUtils.java Tue Apr 19 23:46:06 2022 -0600 +++ b/src/goodjava/io/IoUtils.java Mon May 02 18:56:55 2022 -0600 @@ -26,6 +26,10 @@ Files.move( from.toPath(), to.toPath() ); } + public static void copy( File from, File to ) throws IOException { + Files.copy( from.toPath(), to.toPath() ); + } + public static void delete(File file) throws IOException { Files.deleteIfExists( file.toPath() ); }