|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.string.shellmatcher.ShellList
public class ShellList
The ShellList class can be used to generate a list of files from a UNIX-shell-compatible search pattern. The search pattern may span several directory levels (e. g. "/ usr / src / * / lib* / *.java" - the spaces in the string are there to prevent the compiler from considering this an end of comment, do not insert them in the path in real life).
| Constructor Summary | |
|---|---|
ShellList()
Constructor. |
|
| Method Summary | |
|---|---|
void |
clearFiles()
Clears the current file list. |
void |
expandDirectory(java.lang.String dirName,
java.lang.String pattern)
Find all matching patterns in a directory and add them to the file list. |
void |
expandPattern(java.lang.String pattern)
Expands a pattern to a list of files. |
int |
getFileCount()
Gets the number of elements of the current file list. |
java.lang.String[] |
getFiles()
Gets the current file list. |
static void |
splitPath(java.lang.String path,
java.lang.StringBuffer dir,
java.lang.StringBuffer pattern,
java.lang.StringBuffer remainder)
Splits the supplied path in directory, pattern and remainder. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShellList()
| Method Detail |
|---|
public void expandPattern(java.lang.String pattern)
pattern - The pattern to match the file names against.ShellMatcher.setPattern(java.lang.String) method.public void clearFiles()
public java.lang.String[] getFiles()
public int getFileCount()
public void expandDirectory(java.lang.String dirName,
java.lang.String pattern)
dirName - Path name of the directorypattern - The pattern to match the file names against.ShellMatcher.setPattern(java.lang.String) method.
public static void splitPath(java.lang.String path,
java.lang.StringBuffer dir,
java.lang.StringBuffer pattern,
java.lang.StringBuffer remainder)
path - Path name including patterndir - String buffer the path name (without the pattern part) is saved inpattern - String buffer the pattern part is saved inremainder - String buffer the remainder (after the pattern part) is saved in
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||