Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 2523

Show
Ignore:
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
  • trunk/example/conduits/filescan.d

    r2465 r2523  
    2727                 Stdout.format ("{}\n", file); 
    2828 
    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; 
    3032} 
  • trunk/example/conduits/filescanregex.d

    r2465 r2523  
    1313 
    1414void main(char[][] args) { 
     15    uint total; 
     16 
    1517    if (args.length < 2) { 
    1618        Stdout("Please pass a directory to search").newline; 
     
    2224 
    2325    scan(args[1], delegate bool (FilePath fp, bool isDir) { 
     26         ++total; 
    2427         return isDir || regex.test(fp.toUtf8); 
    2528    }); 
     
    2932             Stdout(file).newline; 
    3033 
    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; 
    3239} 
     40