de.unihalle.informatik.MiToBo.io.dirs
Class DirectoryTree
java.lang.Object
de.unihalle.informatik.MiToBo.core.datatypes.MTBTree
de.unihalle.informatik.MiToBo.io.dirs.DirectoryTree
public class DirectoryTree
- extends MTBTree
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.
- Author:
- moeller
- See Also:
MTBTree
Fields inherited from class de.unihalle.informatik.MiToBo.core.datatypes.MTBTree |
root |
Method Summary |
Vector<String> |
getFileList()
Collect all files in the directory tree including
their complete paths. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectoryTree
public DirectoryTree(String dir)
- Standard constructor.
- Parameters:
dir
- Root directory where to begin the parsing.
DirectoryTree
public DirectoryTree(String dir,
boolean recursiveFlag)
- Constructor.
- Parameters:
dir
- Root directory where to begin the parsing.recursiveFlag
- Flag for recursive processing of sub-directories.
getFileList
public Vector<String> getFileList()
- Collect all files in the directory tree including
their complete paths.
- Returns:
- vector containing all files with absolute path
Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.