diff src/goodjava/io/IoUtils.java @ 1473:6c6ce14db6a8

add goodjava.io
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 17 Apr 2020 13:56:57 -0600
parents
children c7b86342857f
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/goodjava/io/IoUtils.java	Fri Apr 17 13:56:57 2020 -0600
@@ -0,0 +1,18 @@
+package goodjava.io;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+
+
+public final class IoUtils {
+	private IoUtils() {}  // never
+
+	public static void move( File from, File to ) throws IOException {
+		Files.move( from.toPath(), to.toPath() );
+	}
+
+	public static void delete(File file) throws IOException {
+		Files.deleteIfExists( file.toPath() );
+	}
+}
\ No newline at end of file