Rev 10 | Rev 37 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 10 | Rev 11 | ||
---|---|---|---|
Line 46... | Line 46... | ||
46 | public filefind(String filename) |
46 | public filefind(String filename) |
47 | { |
47 | { |
48 | base = new File(filename); |
48 | base = new File(filename); |
49 | } |
49 | } |
50 | 50 | ||
51 | static void start_traverse(File base, String basename) |
51 | static void start_traverse(File base) |
52 | { |
52 | { |
- | 53 | try |
|
- | 54 | { |
|
53 | System.out.println(basename); |
55 | System.out.println(base.getCanonicalPath()); |
- | 56 | } |
|
- | 57 | catch (IOException ie) |
|
- | 58 | { |
|
- | 59 | System.err.println("Caught IOException: " + ie.getMessage()); |
|
- | 60 | } |
|
54 | traverse(base); |
61 | traverse(base); |
55 | } |
62 | } |
56 | 63 | ||
57 | static void traverse(File b) |
64 | static void traverse(File b) |
58 | { |
65 | { |
Line 83... | Line 90... | ||
83 | { |
90 | { |
84 | basename = args[0]; |
91 | basename = args[0]; |
85 | File base = new File(basename); |
92 | File base = new File(basename); |
86 | if (base.isDirectory()) |
93 | if (base.isDirectory()) |
87 | { |
94 | { |
88 | start_traverse(base, basename); |
95 | start_traverse(base); |
89 | } |
96 | } |
90 | else |
97 | else |
91 | { |
98 | { |
92 | Usage(progname, "ERROR: No directory " + basename + " found"); |
99 | Usage(progname, "ERROR: No directory " + basename + " found"); |
93 | } |
100 | } |