public class Glob
extends java.lang.Object
Constructor and Description |
---|
Glob() |
Modifier and Type | Method and Description |
---|---|
static javax.swing.filechooser.FileFilter |
getGlobFileFilter(java.lang.String glob) |
static java.lang.String |
getGlobFromRegex(java.lang.String regex)
converts regex into a glob, as best it can.
|
static java.util.regex.Pattern |
getPattern(java.lang.String glob)
converts a glob into a Pattern.
|
static java.lang.String |
getRegex(java.lang.String glob)
converts a glob into a regex.
|
static FileObject[] |
unGlob(FileSystem fs,
java.lang.String glob)
unglob the glob into an array of the matching FileObjects.
|
public static java.util.regex.Pattern getPattern(java.lang.String glob)
glob
- a string like '*.dat'public static java.lang.String getRegex(java.lang.String glob)
glob,
- like 'foo*.dat'public static java.lang.String getGlobFromRegex(java.lang.String regex)
regex
- regular expression like "foo.\*\.dat"public static FileObject[] unGlob(FileSystem fs, java.lang.String glob) throws java.io.IOException
fs
- the filesystemglob
- the glob, such as '/*.gif'java.io.IOException
public static javax.swing.filechooser.FileFilter getGlobFileFilter(java.lang.String glob)