From 1ee0fa0107c90418b21578b8a28282154f084934 Mon Sep 17 00:00:00 2001 From: Konloch Date: Sun, 13 Feb 2022 14:14:24 -0600 Subject: [PATCH] Code Cleanup --- .../the/bytecode/club/bytecodeviewer/util/MiscUtils.java | 7 +++++++ 1 file changed, 7 insertions(+) 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; + } }