org.extex.resource.tool
Class Lsr

java.lang.Object
  extended by org.extex.resource.tool.Lsr

public class Lsr
extends java.lang.Object

This class creates the output of 'ls -R'.

With the method addexcludeDir() it is possible, to add directories, which are excluded from the ls-R list.

With the method addexcludeRegExp() it is possible, to add a RegExp, which are excluded an entry in each directory.

Files starting with a '.' are ignored!

Version:
$Revision: 5455 $
Author:
Michael Niedermair, Sebastian Waschik

Constructor Summary
Lsr(java.io.File theBasedirectory)
          Creates a new object.
 
Method Summary
 void addExcludeDir(java.lang.String name)
          Add a directory in the exclude list.
 void addExcludeRegExp(java.lang.String name)
          Add a RegExp in the exclude list.
static void main(java.lang.String[] args)
          main.
 void printLsr(java.io.PrintStream printStream)
          Print the ls-R-information to the printStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lsr

public Lsr(java.io.File theBasedirectory)
Creates a new object.

Parameters:
theBasedirectory - The base directory for searching
Method Detail

addExcludeDir

public void addExcludeDir(java.lang.String name)
Add a directory in the exclude list.

Only in the top directory!

Parameters:
name - The name of the directory.

addExcludeRegExp

public void addExcludeRegExp(java.lang.String name)
Add a RegExp in the exclude list.

Parameters:
name - The name of the directory.

printLsr

public void printLsr(java.io.PrintStream printStream)
              throws java.io.IOException
Print the ls-R-information to the printStream.

Parameters:
printStream - The result is written to the PrintStream.
Throws:
java.io.IOException - if an io-error occurs.

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
main.

Parameters:
args - The command line. -excludeDir xxx -excludeRegExp xxx
Throws:
java.io.IOException - if an io-error occurs.