public class DiskIterator
extends java.lang.Object
implements java.util.Enumeration
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
static int |
MAX_FILES_IN_DIR |
static int |
MAX_RECURSE |
| Constructor and Description |
|---|
DiskIterator(java.lang.String rootdir,
java.lang.String filter,
boolean recurse,
boolean dirs,
boolean matchdirs)
Creates DiskIterator to iterate from
rootdir and return files matching filter. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasMoreElements() |
boolean |
match(java.lang.String pattern,
java.lang.String string) |
java.lang.Object |
nextElement()
Returns next file as defined in constructor.
|
public static final boolean DEBUG
public static final int MAX_RECURSE
public static final int MAX_FILES_IN_DIR
public DiskIterator(java.lang.String rootdir,
java.lang.String filter,
boolean recurse,
boolean dirs,
boolean matchdirs)
rootdir and return files matching filter.
If recurse is true, DiskIterator will recurse rootdir subdirectories,
and if dirs is true, nextElement will return directory entries too.
If matchdirs is true, patterns will be matched using absolute path instead of filenames only. You may use this in conjunction with *
wildcard ; for example *.java will match all .java files in all dirs.
Wildcards allowed are ? (any character) and *(any number of any characters), and | (multiple patterns separator).public java.lang.Object nextElement()
nextElement in interface java.util.Enumerationpublic boolean hasMoreElements()
hasMoreElements in interface java.util.Enumerationpublic boolean match(java.lang.String pattern,
java.lang.String string)
Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved