| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.util.FileSearch
public class FileSearch
The FileSearch is a utility class to search files and directories.
| Constructor Summary | |
|---|---|
| FileSearch()Creates a new instance of FileSearch. | |
| Method Summary | |
|---|---|
|  void | clear()Clear previous search results. | 
|  Hashtable<String,List<String>> | getFilesPerDirectory()Gets a list of found files per found directory. | 
|  List<String> | getFoundDirectories()Gets the found directories of a previous search. | 
|  List<String> | getFoundFiles()Gets the found files of a previous search. | 
|  Set<String> | getHierarchicalDirectoryList()Gets the hierarchial directory tree as flat list: directory-1 |- sub-1.1 |- sub-1.2 |- sub-1.3 | |- sub 1.3.1 | |- sub 1.3.2 |- sub 1.4 will return a list with following elements: directory-1 sub-1.1 sub-1.2 sub-1.3 sub-1.3.1 sub-1.3.2 sub-1.4 . | 
|  void | search(File pAnalyse,
       boolean pDeepSearch,
       String... pPathPattern)Searches files and directories. | 
|  void | search(String pAnalyse,
       boolean pDeepSearch,
       String... pPathPattern)Searches files and directories. | 
| static File | searchFirstFile(File pSource,
                String... pPattern)Searches the first file which fits the given pattern(s). | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public FileSearch()
FileSearch.
| Method Detail | 
|---|
public void search(String pAnalyse,
                   boolean pDeepSearch,
                   String... pPathPattern)
pAnalyse - the start directory/filepDeepSearch - true to search files and directories recursive 
                  (include subdirectories)pPathPattern - a list of path patterns (regular expression) or null if all files are valid.
                     If the first character is ! then the pattern is an exclude pattern (all except...). 
                     Directories end with a /, e.g. a directory pattern */.clear()
public void search(File pAnalyse,
                   boolean pDeepSearch,
                   String... pPathPattern)
pAnalyse - the start directory/filepDeepSearch - true to search files and directories recursive 
                  (include subdirectories)pPathPattern - a list of path patterns (regular expression) or null if all files are valid.
                     If the first character is ! then the pattern is an exclude pattern (all except...).
                     Directories end with a /, e.g. a directory pattern */.clear()public void clear()
public List<String> getFoundFiles()
public List<String> getFoundDirectories()
public Hashtable<String,List<String>> getFilesPerDirectory()
public Set<String> getHierarchicalDirectoryList()
directory-1 |- sub-1.1 |- sub-1.2 |- sub-1.3 | |- sub 1.3.1 | |- sub 1.3.2 |- sub 1.4 will return a list with following elements: directory-1 sub-1.1 sub-1.2 sub-1.3 sub-1.3.1 sub-1.3.2 sub-1.4.
public static File searchFirstFile(File pSource,
                                   String... pPattern)
pSource - the start directorypPattern - the file pattern(s). If a pattern starts with ! then the pattern
                 is an exclude pattern
null if no file was found| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||