aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/musichub/business
diff options
context:
space:
mode:
authorClyhtsuriva <aimeric@adjutor.xyz>2021-06-26 14:02:34 +0200
committerClyhtsuriva <aimeric@adjutor.xyz>2021-06-26 14:02:34 +0200
commita57fd29902578adf7238d71cf9bbd55408584557 (patch)
tree44da38a092957dfc7a590d8f7e91a65aa8482d97 /src/main/java/musichub/business
parent4ff84568723b1663b9e20f95535d3213f8d3e92e (diff)
downloadSpoteezer-a57fd29902578adf7238d71cf9bbd55408584557.tar.gz
Spoteezer-a57fd29902578adf7238d71cf9bbd55408584557.tar.bz2
Spoteezer-a57fd29902578adf7238d71cf9bbd55408584557.zip
Applying the latest package architecture.
Diffstat (limited to '')
-rw-r--r--src/main/java/musichub/business/PathValidation.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/java/musichub/business/PathValidation.java b/src/main/java/musichub/business/PathValidation.java
new file mode 100644
index 0000000..97f8759
--- /dev/null
+++ b/src/main/java/musichub/business/PathValidation.java
@@ -0,0 +1,28 @@
+package musichub.business;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+/**
+ * Class offering a path validation method.
+ *
+ * @author Aimeric ADJUTOR
+ * @version 1.0
+ */
+
+public class PathValidation {
+
+ /**
+ * Methode that checks the validity of a given path
+ *
+ * @param inputPath the path given by the user
+ * @return a boolean
+ */
+
+ public static boolean isPathValid(String inputPath) {
+ Path path = Paths.get(inputPath);
+ return Files.exists(path);
+ }
+
+} \ No newline at end of file
il/Policy.java?id=c76898f2ab781b6206e41a11a2f5b59ed658c12d&follow=1'>Fixing conflictsmanthole2-0/+139 2021-06-27Latest maven, jacoco and javadoc filesClyhtsuriva47-313/+822 2021-06-27Catch exception related to search functionalitysaid belhadj4-3/+11 2021-06-27Delete TEST-musichub.business.CategoryTest.xmlSaid Belhadj1-58/+0 2021-06-27Add unit test for Category and Languagesaid belhadj4-0/+164 2021-06-27Update search functionalitysaid belhadj2-0/+8 2021-06-27Added an extension check for songs and covered it with a test.Clyhtsuriva65-77/+92 2021-06-27Fix : Javadoc missingClyhtsuriva80-0/+8465 2021-06-27PlayList class covered at 84%.Clyhtsuriva14-78/+117 2021-06-27Song class fully covered.Clyhtsuriva13-49/+96 2021-06-27Starting Song testsClyhtsuriva17-59/+119 2021-06-27Changed the log type for the JUnit test of LogHandlerClyhtsuriva5-26/+4 2021-06-27XMLHandler tests covered at 91%Clyhtsuriva93-7962/+82