org.das2.util.filesystem.Glob
known bug: *.java matches ".java". The unix glob behavior is to
require that a leading . must be explicitly matched.
getGlobFileFilter
getGlobFileFilter( String glob ) → FileFilter
Returns:
javax.swing.filechooser.FileFilter
search for examples
view on GitHub
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 source
getPattern
getPattern( String glob ) → 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 source
getRegex
getRegex( String glob ) → String
converts a glob into a regex.
Parameters
glob, - like 'foo*.dat'
Returns:
the regular expression that implements, like 'foo.*\.dat'
search for examples
view on GitHub
view source
unGlob
unGlob( org.das2.util.filesystem.FileSystem fs, String glob ) → 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 source