|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.FileTree
public class FileTree
A class generating a file tree from a root directory. If a filenamefilter is specifeid it is passed along with the root dir.
| Nested Class Summary | |
|---|---|
static class |
FileTree.NameFilter
A file filter that accepts file names and extensions. |
| Field Summary | |
|---|---|
private static HashSet<File> |
list
A set of all non-directories found in the tree. |
| Constructor Summary | |
|---|---|
FileTree()
|
|
| Method Summary | |
|---|---|
static File[] |
getArray(File rootdir)
Returns a file list of all files in the given rootdir and below. |
static File[] |
getArray(File rootdir,
FileFilter filter)
Returns a file list of all files in the given rootdir and below. |
static Collection<File> |
getList(File rootdir)
Returns a file list of all files in the given rootdir and below. |
static Collection<File> |
getList(File rootdir,
FileFilter filter)
Returns a file list of all files in the given rootdir and below following the file filter's accept method. |
static void |
main(String[] arg)
Test purpose mainly. |
private static void |
parse(File root,
FileFilter filter,
int level)
Recursevly parse this dir and its subdirs. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static HashSet<File> list
| Constructor Detail |
|---|
public FileTree()
| Method Detail |
|---|
public static Collection<File> getList(File rootdir)
public static Collection<File> getList(File rootdir,
FileFilter filter)
public static File[] getArray(File rootdir)
public static File[] getArray(File rootdir,
FileFilter filter)
private static final void parse(File root,
FileFilter filter,
int level)
list. If a file filter is given, only files
matching that filter are considered. Please be aware that the filter
accepts all directory entries otherwise parsing into subdirs is not
possible.
public static void main(String[] arg)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||