From a5cf7098010a4cbc30a7d18defa2dc002d8989e6 Mon Sep 17 00:00:00 2001 From: nathan Date: Sat, 29 Jul 2017 23:05:57 +0200 Subject: [PATCH] FileUtil.copyFile now supports all permutations --- src/dorkbox/util/FileUtil.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/dorkbox/util/FileUtil.java b/src/dorkbox/util/FileUtil.java index 3555c0c..c45655f 100644 --- a/src/dorkbox/util/FileUtil.java +++ b/src/dorkbox/util/FileUtil.java @@ -251,6 +251,22 @@ class FileUtil { } } + /** + * Copies a files from one location to another. Overwriting any existing file at the destination. + */ + public static + File copyFile(String in, File out) throws IOException { + return copyFile(new File(in), out); + } + + /** + * Copies a files from one location to another. Overwriting any existing file at the destination. + */ + public static + File copyFile(File in, String out) throws IOException { + return copyFile(in, new File(out)); + } + /** * Copies a files from one location to another. Overwriting any existing file at the destination. */ @@ -259,7 +275,6 @@ class FileUtil { return copyFile(new File(in), new File(out)); } - /** * Copies a files from one location to another. Overwriting any existing file at the destination. */