public class FileDirectoryScanner
extends java.lang.Object
Constructor and Description |
---|
FileDirectoryScanner()
Initialize the new instance with default values.
|
Modifier and Type | Method and Description |
---|---|
TableOfContents |
scanDirectory(java.lang.String dir)
Scan the specified directory and return the table of contents that holds
information about all found sub directories and files.
|
TableOfContents |
scanDirectory(java.lang.String dir,
java.lang.String filePattern)
Scan the specified directory and return the table of contents that holds
information about all found sub directories and all files that match
the specified pattern.
|
protected void |
start(java.lang.String dirName,
java.lang.String pattern,
FileHandler handler) |
public FileDirectoryScanner()
public TableOfContents scanDirectory(java.lang.String dir) throws java.io.IOException
dir
- The directory from which to start the scanjava.io.IOException
- If the start directory doesn't exist or is no directorypublic TableOfContents scanDirectory(java.lang.String dir, java.lang.String filePattern) throws java.io.IOException
dir
- The directory from which to start the scanfilePattern
- A pattern for the files to include into the TOCjava.io.IOException
- If the start directory doesn't exist or is no directoryprotected void start(java.lang.String dirName, java.lang.String pattern, FileHandler handler)