|
XDC - v. 0.6.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.xdc.util.PathDescriptor
This class implements the FilenameFilter interface and is used
to filter out files from a list of files contained in a directory.
| Constructor Summary | |
PathDescriptor(java.lang.String path,
boolean defaultExcludes)
Public constructor. |
|
| Method Summary | |
boolean |
accept(java.io.File dir,
java.lang.String name)
This is an implementation of the method defined in the FilenameFilter interface. |
static java.lang.String |
convert(java.lang.String str)
This utility method is used to convert an expression containing "basic" wildcards like "?" |
PathDescriptor |
getChildDescriptor()
If the path used for construction of this PathDescriptor
consists of more than one constituent, this method can be used to retrieve
a child descriptor corresponding to the sub-path after the first
constituent. |
boolean |
matches(java.io.File file)
This method determines whether a String matches the pattern expressed by the first constituent of the path used for construction of this PathDescriptor. |
boolean |
matchesDirWithWildcard(java.io.File file)
This method determines whether a file is a directory and the path pattern of this PathDescriptor is the path wildcard pattern ("**"). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PathDescriptor(java.lang.String path,
boolean defaultExcludes)
path - A path pattern. Its constituents are delimited by forward
slashes ('/') and may contain "basic" wildcards: An asterisk ("*")
means "any substring" (even an empty substring); a question mark
("?") means "any character".defaultExcludes - Specifies whether directories or files probably
containing version control information should be excluded from
processing| Method Detail |
public static java.lang.String convert(java.lang.String str)
str - The string to be converted to a regular expression
public boolean accept(java.io.File dir,
java.lang.String name)
FilenameFilter interface. It tests whether a file with a
certain name is included in the list passing through this filter.
accept in interface java.io.FilenameFilterdir - The directory in which the file is foundname - The name of the file
public boolean matchesDirWithWildcard(java.io.File file)
PathDescriptor is the path wildcard pattern ("**").
file - The file to be tested
PathDescriptor's path pattern is
"**" and the file exists and is a directory and is not to be
excluded because it might be a version control directory.public boolean matches(java.io.File file)
PathDescriptor.
file - The File whose name is to be compared to the
pattern of this PathDescriptor
public PathDescriptor getChildDescriptor()
PathDescriptor
consists of more than one constituent, this method can be used to retrieve
a child descriptor corresponding to the sub-path after the first
constituent.
PathDescriptor. If that path only
consisted of one such part, the method returns null.
|
XDC - v. 0.6.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||