comparison 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
comparison
equal deleted inserted replaced
1472:60f6741f000a 1473:6c6ce14db6a8
1 package goodjava.io;
2
3 import java.io.File;
4 import java.io.IOException;
5 import java.nio.file.Files;
6
7
8 public final class IoUtils {
9 private IoUtils() {} // never
10
11 public static void move( File from, File to ) throws IOException {
12 Files.move( from.toPath(), to.toPath() );
13 }
14
15 public static void delete(File file) throws IOException {
16 Files.deleteIfExists( file.toPath() );
17 }
18 }