 |
Changeset 2523
- Timestamp:
- 08/28/07 04:43:51
(1 year ago)
- Author:
- kris
- Message:
updated to handle FileScan? changes
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2465 |
r2523 |
|
| 27 | 27 | Stdout.format ("{}\n", file); |
|---|
| 28 | 28 | |
|---|
| 29 | | Stdout.format ("\n{} entries inspected\n", scan.inspected).flush; |
|---|
| | 29 | Stdout.formatln ("\n{} Errors", scan.errors.length); |
|---|
| | 30 | foreach (error; scan.errors) |
|---|
| | 31 | Stdout (error).newline; |
|---|
| 30 | 32 | } |
|---|
| r2465 |
r2523 |
|
| 13 | 13 | |
|---|
| 14 | 14 | void main(char[][] args) { |
|---|
| | 15 | uint total; |
|---|
| | 16 | |
|---|
| 15 | 17 | if (args.length < 2) { |
|---|
| 16 | 18 | Stdout("Please pass a directory to search").newline; |
|---|
| … | … | |
| 22 | 24 | |
|---|
| 23 | 25 | scan(args[1], delegate bool (FilePath fp, bool isDir) { |
|---|
| | 26 | ++total; |
|---|
| 24 | 27 | return isDir || regex.test(fp.toUtf8); |
|---|
| 25 | 28 | }); |
|---|
| … | … | |
| 29 | 32 | Stdout(file).newline; |
|---|
| 30 | 33 | |
|---|
| 31 | | Stdout.formatln("Found {0} matches in {1} entries", scan.files.length, scan.inspected); |
|---|
| | 34 | Stdout.formatln("Found {} matches in {} entries", scan.files.length, total); |
|---|
| | 35 | |
|---|
| | 36 | Stdout.formatln ("\n{} Errors", scan.errors.length); |
|---|
| | 37 | foreach (error; scan.errors) |
|---|
| | 38 | Stdout (error).newline; |
|---|
| 32 | 39 | } |
|---|
| | 40 | |
|---|
Download in other formats:
|
 |
 |
|
 |
Copyright © 2006-2008 Tango. All Rights Reserved. | Page Width:
Static or
Dynamic