| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.nlp.util.FilePathProcessor
public class FilePathProcessor
The FilePathProcessor traverses a directory structure and
 applies the processFile method to files meeting some
 criterion.  It is implemented as static methods, not as an extension of
 File.
| Constructor Summary | |
|---|---|
FilePathProcessor()
 | 
|
| Method Summary | |
|---|---|
static void | 
processPath(File path,
            FileFilter filter,
            FileProcessor processor)
Apply a function to the files under a given directory and perhaps its subdirectories.  | 
static void | 
processPath(File path,
            String suffix,
            boolean recursively,
            FileProcessor processor)
Apply a method to the files under a given directory and perhaps its subdirectories.  | 
static void | 
processPath(String pathStr,
            String suffix,
            boolean recursively,
            FileProcessor processor)
Apply a method to the files under a given directory and perhaps its subdirectories.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public FilePathProcessor()
| Method Detail | 
|---|
public static void processPath(String pathStr,
                               String suffix,
                               boolean recursively,
                               FileProcessor processor)
pathStr - file or directory to load from as a Stringsuffix - suffix (normally "File extension") of files to loadrecursively - true means descend into subdirectories as wellprocessor - The FileProcessor to apply to each
                    File
public static void processPath(File path,
                               String suffix,
                               boolean recursively,
                               FileProcessor processor)
path - file or directory to load fromsuffix - suffix (normally "File extension") of files to loadrecursively - true means descend into subdirectories as wellprocessor - The FileProcessor to apply to each
                    File
public static void processPath(File path,
                               FileFilter filter,
                               FileProcessor processor)
pathis a file, then
 that file is processed regardless of whether it satisfies the
 filter.  (This semantics was adopted, since otherwise there was no
 easy way to go through all the files in a directory without
 descending recursively via the specification of a
 FileFilter.)
path - file or directory to load fromfilter - a FileFilter of files to loadprocessor - The FileProcessor to apply to each
                  File
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||