aboutsummaryrefslogtreecommitdiff
path: root/Week12 Find File/src/com/camilstaps/findfile/Week12FindFile.java
blob: 4c59e7e65df6cd96f2cbf13ca1bb7c01c16a7fdb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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());
        }
    }
    
}