org.eclipse.jgit.lib
Class WriteTree

java.lang.Object
  extended by org.eclipse.jgit.lib.TreeVisitorWithCurrentDirectory
      extended by org.eclipse.jgit.lib.WriteTree
All Implemented Interfaces:
TreeVisitor

public class WriteTree
extends TreeVisitorWithCurrentDirectory

A tree visitor for writing a directory tree to the git object database. Blob data is fetched from the files, not the cached blobs.


Constructor Summary
WriteTree(java.io.File sourceDirectory, Repository db)
          Construct a WriteTree for a given directory
 
Method Summary
 void endVisitTree(Tree t)
          Visit to a tree node.
 void visitFile(FileTreeEntry f)
          Visit to a blob.
 void visitGitlink(GitlinkTreeEntry s)
          Visit to a gitlink.
 void visitSymlink(SymlinkTreeEntry s)
          Visit to a symlink.
 
Methods inherited from class org.eclipse.jgit.lib.TreeVisitorWithCurrentDirectory
startVisitTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriteTree

public WriteTree(java.io.File sourceDirectory,
                 Repository db)
Construct a WriteTree for a given directory

Parameters:
sourceDirectory -
db -
Method Detail

visitFile

public void visitFile(FileTreeEntry f)
               throws java.io.IOException
Description copied from interface: TreeVisitor
Visit to a blob.

Parameters:
f - Blob
Throws:
java.io.IOException

visitSymlink

public void visitSymlink(SymlinkTreeEntry s)
                  throws java.io.IOException
Description copied from interface: TreeVisitor
Visit to a symlink.

Parameters:
s - Symlink entry
Throws:
java.io.IOException

endVisitTree

public void endVisitTree(Tree t)
                  throws java.io.IOException
Description copied from interface: TreeVisitor
Visit to a tree node. after child nodes have been visited.

Specified by:
endVisitTree in interface TreeVisitor
Overrides:
endVisitTree in class TreeVisitorWithCurrentDirectory
Parameters:
t - Tree
Throws:
java.io.IOException

visitGitlink

public void visitGitlink(GitlinkTreeEntry s)
                  throws java.io.IOException
Description copied from interface: TreeVisitor
Visit to a gitlink.

Parameters:
s - Gitlink entry
Throws:
java.io.IOException