OSTree.RepoCommitTraverseIter

Fields

Name

Type

Access

Description

dummy

[object]

r/w

dummy_checksum_data

[int]

r/w

initialized

bool

r/w

Methods

class

cleanup (p)

clear ()

get_dir ()

get_file ()

init_commit (repo, commit, flags)

init_dirtree (repo, dirtree, flags)

next (cancellable)

Details

class OSTree.RepoCommitTraverseIter
classmethod cleanup(p)
Parameters:

p (object or None) –

clear()
get_dir()
Returns:

out_name:

Name of current dir

out_content_checksum:

Checksum of current content

out_meta_checksum:

Checksum of current metadata

Return type:

(out_name: str, out_content_checksum: str, out_meta_checksum: str)

Return information on the current directory. This function may only be called if OSTree.RepoCommitIterResult.DIR was returned from OSTree.RepoCommitTraverseIter.next().

get_file()
Returns:

out_name:

Name of current file

out_checksum:

Checksum of current file

Return type:

(out_name: str, out_checksum: str)

Return information on the current file. This function may only be called if OSTree.RepoCommitIterResult.FILE was returned from OSTree.RepoCommitTraverseIter.next().

init_commit(repo, commit, flags)
Parameters:
Raises:

GLib.Error

Return type:

bool

Initialize (in place) an iterator over the root of a commit object.

init_dirtree(repo, dirtree, flags)
Parameters:
Raises:

GLib.Error

Return type:

bool

Initialize (in place) an iterator over a directory tree.

next(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – Cancellable

Raises:

GLib.Error

Return type:

OSTree.RepoCommitIterResult

Step the interator to the next item. Files will be returned first, then subdirectories. Call this in a loop; upon encountering OSTree.RepoCommitIterResult.END, there will be no more files or directories. If OSTree.RepoCommitIterResult.DIR is returned, then call OSTree.RepoCommitTraverseIter.get_dir() to retrieve data for that directory. Similarly, if OSTree.RepoCommitIterResult.FILE is returned, call OSTree.RepoCommitTraverseIter.get_file().

If OSTree.RepoCommitIterResult.ERROR is returned, it is a program error to call any further API on self except for OSTree.RepoCommitTraverseIter.clear().