|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.MiToBo.core.datatypes.MTBTree
de.unihalle.informatik.MiToBo.io.dirs.DirectoryTree
public class DirectoryTree
This class implements a data structure for representing directory trees. It is based on a conventional tree data structure, but provides methods for directly parsing a directory structure into the tree. Additionally, the class provides methods for getting a list of all files in all directories below the given root directory.
MTBTree
Field Summary | |
---|---|
private java.lang.String |
mainpath
Root directory of the tree. |
Fields inherited from class de.unihalle.informatik.MiToBo.core.datatypes.MTBTree |
---|
root |
Constructor Summary | |
---|---|
DirectoryTree(java.lang.String dir)
Standard constructor. |
Method Summary | |
---|---|
java.util.Vector<java.lang.String> |
getFileList()
Collect all files in the directory tree including their complete paths. |
private void |
initFromDirectory()
Builds the directory tree by initiating the recursive parse procedure |
private static MTBTreeNode |
traverseSubdir(java.lang.String path,
java.lang.String subdir)
Recursive traversal of subdirectories. |
Methods inherited from class de.unihalle.informatik.MiToBo.core.datatypes.MTBTree |
---|
getRoot, printTree |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String mainpath
Constructor Detail |
---|
public DirectoryTree(java.lang.String dir)
dir
- root directory where to begin the parsingMethod Detail |
---|
public java.util.Vector<java.lang.String> getFileList()
private void initFromDirectory()
private static MTBTreeNode traverseSubdir(java.lang.String path, java.lang.String subdir)
path
- absolute path to parent directorysubdir
- the subdirectory to be analyzed
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |