CommandLine parses the command line for a description of a
set of files and converts it into a list of individual files
to process.

CommandLine does nothing by itself. It is library code you
can incorporate into your own Java programs like this:

   CommandLine wantedFiles = new CommandLine( args,
     new AllDirectoriesFilter() /* which directories to include */,
     new ExtensionListFilter( "java" ) /* which file extensions to include */);

    // iterate through all the files in the collection.
    for ( File file : wantedFiles )
        {
        System.err.println( file.getCanonicalPath() );
        }// end for

On the command line, you can specify a list of individual
files, mixed with a list of directories.

The Iteration of Files you get have names as you specified
them on the command line. If you need canonical names, you
must use getCanonicalPath or GetCanonicalFile.

If you use the -s switch in includes all the files in all
the recursive subdirectories.

If you use the -q switch, it will suppress the counts of how
many files it found in each subdirectory.

Why that apple tree icon?  It represents a tree of various
types of files, from which you pick some.

----

Version History:

1.3 adds discussion of the windows command line
wildcard expansion and its dangers.

1.4 renamed ListFilter to FileListFilter
It also added ExtensionListFilter

1.5 now uses Java 1.5 type checking. It also
adds the -q command line option to suppress the new
statistics displayed about files gathered from each
directory.

1.6 uses String... in constructors rather than
String[] to let you just specify a variable number of String
arguments.

1.7 tidied the source with IntelliJ.

1.8 refactors the CommandLine class so you can use
it with for:each or with Iterators as before.

1.9 adds StartsWithFilter and EndsWithFilter.

2.0 tidies code.

2.1 adds PAD and icon.

2.2 adds CommandLine.isQuiet to detect the -q option.  You
now iterate the CommandLine directly.

2.3 2007-08-27 adds JunkFilter, formerly part of Bakik.

2.4 2009-02-27 now CommandLine sends output to SysErr rather
than SysOut to avoid contaminating the OutputStream.

2.5 2009-02-28 split off from the filters package into its
               own package.

-30-

