de.unihalle.informatik.MiToBo.io.dirs
Class DirectoryTree

java.lang.Object
  extended by de.unihalle.informatik.MiToBo.core.datatypes.MTBTree
      extended by 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

Field Summary
 
Fields inherited from class de.unihalle.informatik.MiToBo.core.datatypes.MTBTree
root
 
Constructor Summary
DirectoryTree(String dir)
          Standard constructor.
DirectoryTree(String dir, boolean recursiveFlag)
          Constructor.
 
Method Summary
 Vector<String> getFileList()
          Collect all files in the directory tree including their complete paths.
 
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
 

Constructor Detail

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.
Method Detail

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.