Struct git2::Tree [] [src]

pub struct Tree<'repo> {
    // some fields omitted
}

A structure to represent a git tree

Methods

impl<'repo> Tree<'repo>
[src]

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

Trait Implementations

impl<'repo> Drop for Tree<'repo>
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more