## org.das2.util.filesystem.Glob

known bug: *.java matches ".java". The unix glob behavior is to require that a leading . must be explicitly matched.

## Glob( )

## getGlobFileFilter

getGlobFileFilter( String glob ) → javax.swing.filechooser.FileFilter

### Parameters

glob - a String

### Returns:

javax.swing.filechooser.FileFilter
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getGlobFromRegex

getGlobFromRegex( String regex ) → String

converts regex into a glob, as best it can.

### Parameters

regex - regular expression like "foo.\*\.dat"

### Returns:

a glob like "foo*.dat"
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getPattern

getPattern( String glob ) → java.util.regex.Pattern

converts a glob into a Pattern.

### Parameters

glob - a string like '*.dat'

### Returns:

a Pattern for the glob, for example *.dat -> .*\.dat
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getRegex

getRegex( String glob ) → String

converts a glob into a regex.

### Parameters

glob - a String

### Returns:

the regular expression that implements, like 'foo.*\.dat'
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## unGlob

unGlob( org.das2.util.filesystem.FileSystem fs, String glob ) → org.das2.util.filesystem.FileObject[]

unglob the glob into an array of the matching FileObjects. See sftp://papco.org/home/jbf/ct/autoplot/script/demos/filesystem/unGlobDemo.jy

### Parameters

fs - the filesystem
glob - the glob, such as '/*.gif'

### Returns:

an array of FileObjects that match the glob.
[search for examples] [view on GitHub] [view on old javadoc] [view source]