Ggit.Tree¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Ggit.Tree(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Represents a tree object.
- get(i)¶
- Parameters:
i (
int
) – the index of the entry.- Returns:
a
Ggit.TreeEntry
orNone
.- Return type:
Get a tree entry by index.
- get_by_name(name)¶
- Parameters:
name (
str
) – a filename.- Returns:
a
Ggit.TreeEntry
orNone
.- Return type:
Get a tree entry by name.
- get_by_path(path)¶
- Parameters:
path (
str
) – a path.- Raises:
- Returns:
a
Ggit.TreeEntry
orNone
.- Return type:
Retrieves a tree entry contained in a tree or in any of its subtrees, given its relative path.
- size()¶
- Returns:
the number of entries in the tree.
- Return type:
Get the number of entries in the tree.
- walk(mode, callback, *user_data)¶
- Parameters:
mode (
Ggit.TreeWalkMode
) – the walking order.callback (
Ggit.TreeWalkCallback
) – the callback to call for each entry.
- Raises:
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).