org.eclipse.jgit.lib
Class FileTreeEntry
java.lang.Object
org.eclipse.jgit.lib.TreeEntry
org.eclipse.jgit.lib.FileTreeEntry
- All Implemented Interfaces:
- java.lang.Comparable
public class FileTreeEntry
- extends TreeEntry
A representation of a file (blob) object in a Tree.
|
Constructor Summary |
FileTreeEntry(Tree parent,
ObjectId id,
byte[] nameUTF8,
boolean execute)
Constructor for a File (blob) object. |
| Methods inherited from class org.eclipse.jgit.lib.TreeEntry |
accept, compareTo, delete, detachParent, getFullName, getFullNameUTF8, getId, getName, getNameUTF8, getParent, getRepository, isModified, lastChar, lastChar, rename, rename, setId, setModified |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FileTreeEntry
public FileTreeEntry(Tree parent,
ObjectId id,
byte[] nameUTF8,
boolean execute)
- Constructor for a File (blob) object.
- Parameters:
parent - The Tree holding this object (or null)id - the SHA-1 of the blob (or null for a yet unhashed file)nameUTF8 - raw object name in the parent treeexecute - true if the executable flag is set
getMode
public FileMode getMode()
- Specified by:
getMode in class TreeEntry
- Returns:
- mode (type of object)
isExecutable
public boolean isExecutable()
- Returns:
- true if this file is executable
setExecutable
public void setExecutable(boolean execute)
- Parameters:
execute - set/reset the executable flag
openReader
public ObjectLoader openReader()
throws java.io.IOException
- Returns:
- an
ObjectLoader that will return the data
- Throws:
java.io.IOException
accept
public void accept(TreeVisitor tv,
int flags)
throws java.io.IOException
- Description copied from class:
TreeEntry
- Visit the members of this TreeEntry.
- Specified by:
accept in class TreeEntry
- Parameters:
tv - A visitor object doing the workflags - Specification for what members to visit. See
TreeEntry.MODIFIED_ONLY, TreeEntry.LOADED_ONLY,
TreeEntry.CONCURRENT_MODIFICATION.
- Throws:
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object