org.eclipse.jgit.treewalk
Class FileTreeIterator
java.lang.Object
org.eclipse.jgit.treewalk.AbstractTreeIterator
org.eclipse.jgit.treewalk.WorkingTreeIterator
org.eclipse.jgit.treewalk.FileTreeIterator
public class FileTreeIterator
- extends WorkingTreeIterator
Working directory iterator for standard Java IO.
This iterator uses the standard java.io package to read the
specified working directory as part of a TreeWalk.
|
Constructor Summary |
|
FileTreeIterator(java.io.File root)
Create a new iterator to traverse the given directory and its children. |
protected |
FileTreeIterator(FileTreeIterator p,
java.io.File root)
Create a new iterator to traverse a subdirectory. |
| Methods inherited from class org.eclipse.jgit.treewalk.AbstractTreeIterator |
createEmptyTreeIterator, createSubtreeIterator, ensurePathCapacity, getEntryFileMode, getEntryObjectId, getEntryObjectId, getEntryPathString, getEntryRawMode, getName, getNameLength, growPath, idEqual, pathCompare, skip, stopWalk |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileTreeIterator
public FileTreeIterator(java.io.File root)
- Create a new iterator to traverse the given directory and its children.
- Parameters:
root - the starting directory. This directory should correspond to
the root of the repository.
FileTreeIterator
protected FileTreeIterator(FileTreeIterator p,
java.io.File root)
- Create a new iterator to traverse a subdirectory.
- Parameters:
p - the parent iterator we were created from.root - the subdirectory. This should be a directory contained within
the parent directory.
createSubtreeIterator
public AbstractTreeIterator createSubtreeIterator(Repository repo)
throws IncorrectObjectTypeException,
java.io.IOException
- Description copied from class:
AbstractTreeIterator
- Create a new iterator for the current entry's subtree.
The parent reference of the iterator must be this,
otherwise the caller would not be able to exit out of the subtree
iterator correctly and return to continue walking this.
- Specified by:
createSubtreeIterator in class AbstractTreeIterator
- Parameters:
repo - repository to load the tree data from.
- Returns:
- a new parser that walks over the current subtree.
- Throws:
IncorrectObjectTypeException - the current entry is not actually a tree and cannot be parsed
as though it were a tree.
java.io.IOException - a loose object or pack file could not be read.