com.stevesoft.pat
Class NonDirFileRegex

java.lang.Object
  |
  +--com.stevesoft.pat.RegRes
        |
        +--com.stevesoft.pat.Regex
              |
              +--com.stevesoft.pat.FileRegex
                    |
                    +--com.stevesoft.pat.NonDirFileRegex
All Implemented Interfaces:
java.lang.Cloneable, java.io.FilenameFilter

public class NonDirFileRegex
extends FileRegex

This class is just like FileRegex, except that its accept method only returns true if the file matching the pattern is not a directory.


Fields inherited from class com.stevesoft.pat.Regex
dotDoesntMatchCR, esc
 
Fields inherited from class com.stevesoft.pat.RegRes
charsMatched_, didMatch_, marks, matchFrom_, numSubs_, src
 
Constructor Summary
NonDirFileRegex()
           
NonDirFileRegex(java.lang.String fp)
           
 
Method Summary
static java.lang.String[] list(java.lang.String f)
          Provides an alternative to File.list -- this separates its argument according to File.pathSeparator.
 
Methods inherited from class com.stevesoft.pat.FileRegex
accept, compile, isLiteral, toFileRegex
 
Methods inherited from class com.stevesoft.pat.Regex
add, clone, compile1, countMaxChars, countMinChars, define, define, equals, getDefaultMFlag, getDontMatchInQuotes, getGFlag, getIgnoreCase, getMFlag, getReplacer, getReplaceRule, getSFlag, isDefined, matchAt, matchAt, optimize, optimized, perlCode, replaceAll, replaceAll, replaceAllFrom, replaceAllRegion, replaceFirst, replaceFirstFrom, replaceFirstRegion, result, reverseSearch, reverseSearch, search, search, searchFrom, searchFrom, searchRegion, setDefaultMFlag, setDontMatchInQuotes, setGFlag, setIgnoreCase, setReplaceRule, setReplaceRule, toString, undefine, version
 
Methods inherited from class com.stevesoft.pat.RegRes
charsMatched, charsMatched, copyOutOf, didMatch, equals, getString, getStringLike, left, left, matchedFrom, matchedFrom, matchedTo, matchedTo, matchFrom, matchFrom, numSubs, right, right, stringMatched, stringMatched, substring, substring

 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NonDirFileRegex

public NonDirFileRegex()

NonDirFileRegex

public NonDirFileRegex(java.lang.String fp)
Method Detail

list

public static java.lang.String[] list(java.lang.String f)
Description copied from class: FileRegex
Provides an alternative to File.list -- this separates its argument according to File.pathSeparator. To each path, it splits off a directory -- all characters up to and including the first instance of File.separator -- and a file pattern -- the part that comes after the directory. It then produces a list of all the pattern matches on all the paths. Thus "*.java:../*.java" would produce a list of all the java files in this directory and in the ".." directory on a Unix machine. "*.java;..\\*.java" would do the same thing on a Dos machine.