C# 클래스 GitSharp.Core.Tree

A representation of a Git tree entry. A Tree is a directory in Git.
상속: TreeEntry, Treeish
파일 보기 프로젝트 열기: stschake/GitSharp 1 사용 예제들

공개 메소드들

메소드 설명
Accept ( TreeVisitor tv, int flags ) : void
AddEntry ( TreeEntry e ) : void

Add the specified tree entry to this tree.

AddFile ( byte s, int offset ) : FileTreeEntry

Adds a new or existing file with the specified name to this tree. Trees are added if necessary as the name may contain '/':s.

AddFile ( string name ) : FileTreeEntry

Adds a new or existing file with the specified name to this tree. Trees are added if necessary as the name may contain '/':s.

AddTree ( byte s, int offset ) : Tree

Adds a new or existing Tree with the specified name to this tree. Trees are added if necessary as the name may contain '/':s.

AddTree ( string name ) : Tree

Adds a new or existing Tree with the specified name to this tree. Trees are added if necessary as the name may contain '/':s.

CompareNames ( byte a, byte b, int lastA, int lastB ) : int

Compare two names represented as bytes. Since git treats names of trees and blobs differently we have one parameter that represents a '/' for trees. For other objects the value should be NUL. The names are compare by their positive byte value (0..255). A blob and a tree with the same name will not compare equal.

ExistsBlob ( string path ) : bool
ExistsTree ( string path ) : bool
FindBlobMember ( string blobName ) : TreeEntry
ToString ( ) : string
Tree ( Repository repo ) : System

Constructor for a new Tree

Tree ( Repository repo, ObjectId id, byte raw ) : System

Construct a Tree object with known content and hash value

Tree ( Tree parent, ObjectId id, byte nameUTF8 ) : System

Construct a Tree with a known SHA-1 under another tree. Data is not yet specified and will have to be loaded on demand.

Tree ( Tree parent, byte nameUTF8 ) : System

Construct a new Tree under another Tree

Unload ( ) : void

Forget the in-memory data for this tree.

findTreeMember ( string treeName ) : TreeEntry

비공개 메소드들

메소드 설명
BinarySearch ( TreeEntry entries, byte nameUTF8, int nameUTF8Last, int nameStart, int nameEnd ) : int
CompareNames ( byte a, byte nameUTF8, int nameStart, int nameEnd, int lastA, int lastB ) : int

Compare two names represented as bytes. Since git treats names of trees and blobs differently we have one parameter that represents a '/' for trees. For other objects the value should be NUL. The names are compare by their positive byte value (0..255). A blob and a tree with the same name will not compare equal.

EnsureLoaded ( ) : void
Exists ( string s, byte slast ) : bool
FindMember ( byte s, byte slast, int offset ) : TreeEntry
FindMember ( string s, byte slast ) : TreeEntry
InsertEntry ( int p, TreeEntry e ) : void
ReadTree ( byte raw ) : void
RemoveEntry ( TreeEntry e ) : void
SubString ( byte s, int nameStart, int nameEnd ) : byte[]

메소드 상세

Accept() 공개 메소드

public Accept ( TreeVisitor tv, int flags ) : void
tv TreeVisitor
flags int
리턴 void

AddEntry() 공개 메소드

Add the specified tree entry to this tree.
public AddEntry ( TreeEntry e ) : void
e TreeEntry
리턴 void

AddFile() 공개 메소드

Adds a new or existing file with the specified name to this tree. Trees are added if necessary as the name may contain '/':s.
public AddFile ( byte s, int offset ) : FileTreeEntry
s byte an array containing the name
offset int when the name starts in the tree. ///
리턴 FileTreeEntry

AddFile() 공개 메소드

Adds a new or existing file with the specified name to this tree. Trees are added if necessary as the name may contain '/':s.
public AddFile ( string name ) : FileTreeEntry
name string Name
리턴 FileTreeEntry

AddTree() 공개 메소드

Adds a new or existing Tree with the specified name to this tree. Trees are added if necessary as the name may contain '/':s.
public AddTree ( byte s, int offset ) : Tree
s byte an array containing the name
offset int when the name starts in the tree.
리턴 Tree

AddTree() 공개 메소드

Adds a new or existing Tree with the specified name to this tree. Trees are added if necessary as the name may contain '/':s.
public AddTree ( string name ) : Tree
name string
리턴 Tree

CompareNames() 공개 정적인 메소드

Compare two names represented as bytes. Since git treats names of trees and blobs differently we have one parameter that represents a '/' for trees. For other objects the value should be NUL. The names are compare by their positive byte value (0..255). A blob and a tree with the same name will not compare equal.
public static CompareNames ( byte a, byte b, int lastA, int lastB ) : int
a byte name
b byte name
lastA int '/' if a is a tree, else NULL.
lastB int '/' if b is a tree, else NULL.
리턴 int

ExistsBlob() 공개 메소드

public ExistsBlob ( string path ) : bool
path string
리턴 bool

ExistsTree() 공개 메소드

public ExistsTree ( string path ) : bool
path string Path to the tree.
리턴 bool

FindBlobMember() 공개 메소드

public FindBlobMember ( string blobName ) : TreeEntry
blobName string
리턴 TreeEntry

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

Tree() 공개 메소드

Constructor for a new Tree
public Tree ( Repository repo ) : System
repo Repository The repository that owns the Tree.
리턴 System

Tree() 공개 메소드

Construct a Tree object with known content and hash value
public Tree ( Repository repo, ObjectId id, byte raw ) : System
repo Repository
id ObjectId
raw byte
리턴 System

Tree() 공개 메소드

Construct a Tree with a known SHA-1 under another tree. Data is not yet specified and will have to be loaded on demand.
public Tree ( Tree parent, ObjectId id, byte nameUTF8 ) : System
parent Tree
id ObjectId
nameUTF8 byte
리턴 System

Tree() 공개 메소드

Construct a new Tree under another Tree
public Tree ( Tree parent, byte nameUTF8 ) : System
parent Tree
nameUTF8 byte
리턴 System

Unload() 공개 메소드

Forget the in-memory data for this tree.
public Unload ( ) : void
리턴 void

findTreeMember() 공개 메소드

public findTreeMember ( string treeName ) : TreeEntry
treeName string Tree name
리턴 TreeEntry