Struct git2::Tree
[−]
[src]
pub struct Tree<'repo> { // some fields omitted }
A structure to represent a git tree
Methods
impl<'repo> Tree<'repo>
fn id(&self) -> Oid
Get the id (SHA1) of a repository object
fn len(&self) -> usize
Get the number of entries listed in this tree.
fn iter(&self) -> TreeIter
Returns an iterator over the entries in this tree.
fn get_id(&self, id: Oid) -> Option<TreeEntry>
Lookup a tree entry by SHA value.
fn get(&self, n: usize) -> Option<TreeEntry>
Lookup a tree entry by its position in the tree
fn get_name(&self, filename: &str) -> Option<TreeEntry>
Lookup a tree entry by its filename
fn get_path(&self, path: &Path) -> Result<TreeEntry<'static>, Error>
Retrieve a tree entry contained in a tree or in any of its subtrees, given its relative path.
fn as_object(&self) -> &Object<'repo>
Casts this Tree to be usable as an Object