Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rj.tools.util
Class FileFinder

    java.lang.Object
      |
      +--rj.tools.util.FileFinder

public class FileFinder
extends java.lang.Object

`FileFinder` is helper clas which assists in getting all files from a folder. A filter can be used to match certain patterns. Also a recuresive descent to getValue files from subfolder is supported. If a FileFilter is used, it has to return true if the File is a directory and the recursive option is used.

Version:
  $Revision: 1.6 $
Author:
  Ralph Jocham

Constructor Summary
`FileFinder(java.lang.String folder, boolean recursive)` Constructor
`FileFinder(java.lang.String folder, java.io.FileFilter filter, boolean recursive)` Constructor

Method Summary
`java.util.Collection` | `getDirectories()` getDirectories returns a collection of directories found in the directorie(s) being searched.
`java.util.Collection` | `getFiles()` getFiles return the collection of files found

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FileFinder

    public FileFinder(java.lang.String folder,
                      boolean recursive)

  Constructor
  Parameters:
    `folder` - - folder to list
    `recursive` - - descend into subfolders

### FileFinder

    public FileFinder(java.lang.String folder,
                      java.io.FileFilter filter,
                      boolean recursive)

  Constructor
  Parameters:
    `folder` - - folder to list
    `filter` - - filter criteria
    `recursive` - - descend into subfolders

Method Detail

### getFiles

    public java.util.Collection getFiles()

  getFiles return the collection of files found
  Returns:
    a Collection of File instances

### getDirectories

    public java.util.Collection getDirectories()

  getDirectories returns a collection of directories found in the directorie(s) being searched.
  Returns:
    a Collection of File instances

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(c) 1999-2004 by Ralph Jocham (rjocham72@netscape.net)
JCSC is released under the terms of the GNU General Public License