aboutsummaryrefslogtreecommitdiff
path: root/Week12 Find File/src/com/camilstaps/findfile/Week12FindFile.java
diff options
context:
space:
mode:
Diffstat (limited to 'Week12 Find File/src/com/camilstaps/findfile/Week12FindFile.java')
-rw-r--r--Week12 Find File/src/com/camilstaps/findfile/Week12FindFile.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/Week12 Find File/src/com/camilstaps/findfile/Week12FindFile.java b/Week12 Find File/src/com/camilstaps/findfile/Week12FindFile.java
new file mode 100644
index 0000000..4c59e7e
--- /dev/null
+++ b/Week12 Find File/src/com/camilstaps/findfile/Week12FindFile.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2015 Camil Staps
+ */
+package com.camilstaps.findfile;
+
+import java.io.IOException;
+
+/**
+ *
+ * @author camilstaps
+ */
+public class Week12FindFile {
+
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String[] args) {
+ if (args.length != 2) {
+ System.err.println("Usage: java Week12FindFile <searchdir> <filename>");
+ System.exit(-1);
+ }
+
+ try {
+ Thread t = new Thread(new FileFinder(args[0], args[1]));
+ t.start();
+ } catch (IOException ex) {
+ System.err.println(ex.toString());
+ }
+ }
+
+}