|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sshtools.sftp.GlobRegExpMatching
Implements the RegularExpressionMatching Interface.
matchFileNamesWithPattern performs a Glob regular expression pattern match on the Files passed to it, using fileNameRegExp, then returns the ones that match.Code example:
File f=new File("c:\\homefolder");
File[] someFiles;
List files in folder f and store in someFiles.
someFiles=f.listFiles();
Find the '.doc' files in someFiles that have 'rfc' in their name.
String[] matchedFiles=matchFileNamesWithPattern(someFiles, "*rfc*.doc");
matchFilesWithPattern performs a Glob regular expression pattern match on the SftpFiles passed to it, using fileNameRegExp, then returns the ones that match.
| Constructor Summary | |
GlobRegExpMatching()
|
|
| Method Summary | |
java.lang.String[] |
matchFileNamesWithPattern(java.io.File[] files,
java.lang.String fileNameRegExp)
compiles fileNameRegExp into a regular expression and pattern matches on each file's name, and returns those that match. |
SftpFile[] |
matchFilesWithPattern(SftpFile[] files,
java.lang.String fileNameRegExp)
compiles fileNameRegExp into a regular expression and pattern matches on each file's name, and returns those that match. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GlobRegExpMatching()
| Method Detail |
public java.lang.String[] matchFileNamesWithPattern(java.io.File[] files,
java.lang.String fileNameRegExp)
throws SshException
matchFileNamesWithPattern in interface RegularExpressionMatchingfiles - fileNameRegExp -
SshException
public SftpFile[] matchFilesWithPattern(SftpFile[] files,
java.lang.String fileNameRegExp)
throws SftpStatusException,
SshException
matchFilesWithPattern in interface RegularExpressionMatchingfiles - fileNameRegExp -
SftpStatusException
SshException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||