|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.informatica.io.WildcardFilter
public final class WildcardFilter
Wildcard filter for use as a FilenameFilter or FileFilter.
Implements the file Filter-related interfaces, and allows to use wildcards as Filter specifications.
Note for Windows users: while Java allows compatibility with Unix-style
paths of the type C:/path/to/file, this filter does not
allow this and requires the typical DOS paths (C:\path\to\file).
| Constructor Summary | |
|---|---|
WildcardFilter()
Default Constructor. |
|
WildcardFilter(FilesystemInfo filesystemInfo)
Constructor with FilesystemInfo argument. |
|
| Method Summary | |
|---|---|
boolean |
accept(File pathname)
|
boolean |
accept(File dir,
String name)
|
boolean |
accept(String path)
|
String[] |
getAllDirs()
Gives an array of all directories matching the wildcard path. |
String |
getCanonWildcardPath()
|
FilePatternSpec |
getFilePatternSpec()
|
String[] |
getFilterDirs(String path)
|
String |
mergeWildcard(String path)
Try to merge this path with wildcards. |
void |
setWildcardPath(String path)
Set the wildcard path to be used. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WildcardFilter()
public WildcardFilter(FilesystemInfo filesystemInfo)
filesystemInfo - the FilesystemInfo object appropriate for the filesystem.| Method Detail |
|---|
public FilePatternSpec getFilePatternSpec()
public void setWildcardPath(String path)
path - The path with wildcards.public String getCanonWildcardPath()
public boolean accept(File dir,
String name)
accept in interface FilenameFilterpublic boolean accept(File pathname)
accept in interface FileFilterpublic boolean accept(String path)
public String[] getFilterDirs(String path)
path - Absolute path with first-level wildcards.
public String[] getAllDirs()
The reason to give directories (merged with file part of the wildcard path) is to lower memory consumption when using very generic wildcards, as for example it is not the same to return all the directories in a Filesystem than returning all the directories and all the files.
public String mergeWildcard(String path)
If matches, return the merged path, otherwise null.
path - the path to merge.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||