|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jgit.lib.TreeEntry
org.eclipse.jgit.lib.Tree
TreeWalk.forPath(Repository, String, org.eclipse.jgit.revwalk.RevTree).
To lookup information about multiple paths at once, use a
TreeWalk and obtain the current entry's
information from its getter methods.
@Deprecated public class Tree
A representation of a Git tree entry. A Tree is a directory in Git.
| Constructor Summary | |
|---|---|
Tree(Repository repo)
Deprecated. Constructor for a new Tree |
|
Tree(Repository repo,
ObjectId myId,
byte[] raw)
Deprecated. Construct a Tree object with known content and hash value |
|
Tree(Tree parent,
byte[] nameUTF8)
Deprecated. Construct a new Tree under another Tree |
|
Tree(Tree parent,
ObjectId id,
byte[] nameUTF8)
Deprecated. Construct a Tree with a known SHA-1 under another tree. |
|
| Method Summary | |
|---|---|
void |
addEntry(TreeEntry e)
Deprecated. Add the specified tree entry to this tree. |
FileTreeEntry |
addFile(byte[] s,
int offset)
Deprecated. Adds a new or existing file with the specified name to this tree. |
FileTreeEntry |
addFile(String name)
Deprecated. Adds a new or existing file with the specified name to this tree. |
Tree |
addTree(byte[] s,
int offset)
Deprecated. Adds a new or existing Tree with the specified name to this tree. |
Tree |
addTree(String name)
Deprecated. Adds a new or existing Tree with the specified name to this tree. |
static int |
compareNames(byte[] a,
byte[] b,
int lasta,
int lastb)
Deprecated. Compare two names represented as bytes. |
boolean |
existsBlob(String path)
Deprecated. |
boolean |
existsTree(String path)
Deprecated. |
TreeEntry |
findBlobMember(String s)
Deprecated. |
TreeEntry |
findTreeMember(String s)
Deprecated. |
byte[] |
format()
Deprecated. Format this Tree in canonical format. |
FileMode |
getMode()
Deprecated. |
Repository |
getRepository()
Deprecated. |
boolean |
isLoaded()
Deprecated. |
boolean |
isRoot()
Deprecated. |
int |
memberCount()
Deprecated. |
TreeEntry[] |
members()
Deprecated. Return all members of the tree sorted in Git order. |
String |
toString()
Deprecated. |
void |
unload()
Deprecated. Forget the in-memory data for this tree. |
| Methods inherited from class org.eclipse.jgit.lib.TreeEntry |
|---|
compareTo, delete, detachParent, getFullName, getFullNameUTF8, getId, getName, getNameUTF8, getParent, isModified, lastChar, rename, rename, setId, setModified |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Tree(Repository repo)
repo - The repository that owns the Tree.
public Tree(Repository repo,
ObjectId myId,
byte[] raw)
throws IOException
repo - myId - raw -
IOException
public Tree(Tree parent,
byte[] nameUTF8)
parent - nameUTF8 -
public Tree(Tree parent,
ObjectId id,
byte[] nameUTF8)
parent - id - nameUTF8 - | Method Detail |
|---|
public static final int compareNames(byte[] a,
byte[] b,
int lasta,
int lastb)
a - nameb - namelasta - '/' if a is a tree, else NULlastb - '/' if b is a tree, else NUL
public FileMode getMode()
getMode in class TreeEntrypublic boolean isRoot()
public Repository getRepository()
getRepository in class TreeEntrypublic boolean isLoaded()
public void unload()
public FileTreeEntry addFile(String name)
throws IOException
name - Name
FileTreeEntry for the added file.
IOException
public FileTreeEntry addFile(byte[] s,
int offset)
throws IOException
s - an array containing the nameoffset - when the name starts in the tree.
FileTreeEntry for the added file.
IOException
public Tree addTree(String name)
throws IOException
name - Name
FileTreeEntry for the added tree.
IOException
public Tree addTree(byte[] s,
int offset)
throws IOException
s - an array containing the nameoffset - when the name starts in the tree.
FileTreeEntry for the added tree.
IOException
public void addEntry(TreeEntry e)
throws IOException
e -
IOException
public int memberCount()
throws IOException
IOException
public TreeEntry[] members()
throws IOException
100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 a.b 040000 tree 4277b6e69d25e5efa77c455340557b384a4c018a a 100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 a:b
IOException
public boolean existsTree(String path)
throws IOException
path - to the tree.
IOException
public boolean existsBlob(String path)
throws IOException
path - of the non-tree entry.
IOException
public TreeEntry findBlobMember(String s)
throws IOException
s - blob name
TreeEntry representing an object with the specified
relative path.
IOException
public TreeEntry findTreeMember(String s)
throws IOException
s - Tree Name
IOException
public byte[] format()
throws IOException
IOException - the tree cannot be loaded, or its not in a writable state.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||