Ggit.Tree

g GObject.Object GObject.Object Ggit.ObjectFactoryBase Ggit.ObjectFactoryBase GObject.Object->Ggit.ObjectFactoryBase Ggit.Native Ggit.Native Ggit.Object Ggit.Object Ggit.Native->Ggit.Object Ggit.Tree Ggit.Tree Ggit.Object->Ggit.Tree Ggit.ObjectFactoryBase->Ggit.Native

Subclasses:

None

Methods

Inherited:

Ggit.Object (2), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get (i)

get_by_name (name)

get_by_path (path)

get_id ()

size ()

walk (mode, callback, *user_data)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Ggit.Native (1)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Ggit.Object

r

Class Details

class Ggit.Tree(**kwargs)
Bases:

Ggit.Object

Abstract:

No

Structure:

Ggit.TreeClass

Represents a tree object.

get(i)
Parameters:

i (int) – the index of the entry.

Returns:

a Ggit.TreeEntry or None.

Return type:

Ggit.TreeEntry or None

Get a tree entry by index.

get_by_name(name)
Parameters:

name (str) – a filename.

Returns:

a Ggit.TreeEntry or None.

Return type:

Ggit.TreeEntry or None

Get a tree entry by name.

get_by_path(path)
Parameters:

path (str) – a path.

Raises:

GLib.Error

Returns:

a Ggit.TreeEntry or None.

Return type:

Ggit.TreeEntry or None

Retrieves a tree entry contained in a tree or in any of its subtrees, given its relative path.

get_id()
Returns:

a Ggit.OId or None.

Return type:

Ggit.OId or None

Get the Ggit.OId of the tree.

size()
Returns:

the number of entries in the tree.

Return type:

int

Get the number of entries in the tree.

walk(mode, callback, *user_data)
Parameters:
Raises:

GLib.Error

Walk all the entries of a tree object recursively (resolving and walking subtrees of the tree as needed). The error will be set to the error returned by callback (if any).