diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/util/MiscUtils.java b/src/main/java/the/bytecode/club/bytecodeviewer/util/MiscUtils.java index 536dc7c1..75c9c01c 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/util/MiscUtils.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/util/MiscUtils.java @@ -335,4 +335,11 @@ public class MiscUtils return new File[0]; } + public static File deleteExistingFile(File file) + { + if (file.exists()) + file.delete(); + + return file; + } }