diff --git a/.idea/misc.xml b/.idea/misc.xml index cf9abe6..69ace3f 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/src/HiddenSecrets.java b/src/HiddenSecrets.java index 71067b3..7d6ecdf 100644 --- a/src/HiddenSecrets.java +++ b/src/HiddenSecrets.java @@ -7,6 +7,9 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Scanner; // PUT YOUR IMPORTS HERE @@ -35,12 +38,16 @@ public static void getHiddenSecrets(File file) { System.out.println("Failed to process the image meta-data"); } } - public static void main(String[] args) { // Put your code to request a file path, // read in a string from System.in, + Scanner s = new Scanner(System.in); + System.out.println("Please gave me a file path: "); + String filePath = s.nextLine(); // convert that string into A Path type using Paths class, + Path path = Paths.get(filePath); // and call the getHiddenSecrets method to get the file's meta-data + HiddenSecrets.getHiddenSecrets(path.toFile()); // HERE } }