From efca24b9b338937bbfe2eafd4e9e4d46dece3adf Mon Sep 17 00:00:00 2001 From: TidyCoder <157531579+Tidy-Coder@users.noreply.github.com> Date: Mon, 5 Aug 2024 20:40:03 +0100 Subject: [PATCH] Create java-function-are-here.java --- java/java-function-are-here.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 java/java-function-are-here.java diff --git a/java/java-function-are-here.java b/java/java-function-are-here.java new file mode 100644 index 0000000..0754ee6 --- /dev/null +++ b/java/java-function-are-here.java @@ -0,0 +1,22 @@ +import java.io.file; + +public class TidyOpenFileManagementLibrary(){ + public boolean exists(String tidyPath){ + return (new File(tidyPath)).exists(); + } + public boolean isFolder(String tidyPath){ + return (new File(tidyPath)).isDirectory(); + } + public boolean isFile(String tidyPath){ + return (new File(tidyPath)).isFile(); + } + public boolean createFolder(String tidyPath){ + return (new File(tidyPath)).mkdir(tidyPath); + } + public boolean delete(String tidyPath){ + return (new File(tidyPath)).delete(tidyPath); + } + public boolean createFile(String tidyPath){ + return (new File(tidyPath)).createNewFile(); + } +}