diff --git a/.idea/misc.xml b/.idea/misc.xml index cf9abe6..501ce09 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/images/Capture.PNG b/images/Capture.PNG new file mode 100644 index 0000000..b611cb6 Binary files /dev/null and b/images/Capture.PNG differ diff --git a/src/HiddenSecrets.java b/src/HiddenSecrets.java index 71067b3..45b2b1a 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 @@ -39,8 +42,13 @@ public static void getHiddenSecrets(File file) { 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("Give me a flie"); + String fpStr = s.nextLine(); // convert that string into A Path type using Paths class, + Path path = Paths.get(fpStr); // and call the getHiddenSecrets method to get the file's meta-data + getHiddenSecrets(path.toFile()); // HERE } }