OSTree.RepoFile

g GObject.GInterface GObject.GInterface Gio.File Gio.File GObject.GInterface->Gio.File GObject.Object GObject.Object OSTree.RepoFile OSTree.RepoFile GObject.Object->OSTree.RepoFile Gio.File->OSTree.RepoFile

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.File (138)

Structs:

GObject.ObjectClass (5)

ensure_resolved ()

get_checksum ()

get_repo ()

get_root ()

get_xattrs (cancellable)

tree_find_child (name)

tree_get_contents ()

tree_get_contents_checksum ()

tree_get_metadata ()

tree_get_metadata_checksum ()

tree_query_child (n, attributes, flags, cancellable)

tree_set_metadata (checksum, metadata)

Virtual Methods

Inherited:

GObject.Object (7), Gio.File (97)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class OSTree.RepoFile(**kwargs)
Bases:

GObject.Object, Gio.File

Abstract:

No

Structure:

OSTree.RepoFileClass

ensure_resolved()
Raises:

GLib.Error

Returns:

False if the operation failed, True otherwise

Return type:

bool

Ensure that the backing metadata is loaded.

get_checksum()
Return type:

str

get_repo()
Returns:

Repository

Return type:

OSTree.Repo

get_root()
Returns:

The root directory for the commit referenced by this file

Return type:

OSTree.RepoFile

get_xattrs(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – Cancellable

Raises:

GLib.Error

Returns:

out_xattrs:

the extended attributes

Return type:

(bool, out_xattrs: GLib.Variant)

tree_find_child(name)
Parameters:

name (str) – name of the child

Return type:

(int, is_dir: bool, out_container: GLib.Variant)

tree_get_contents()
Returns:

The GLib.Variant representing the children of this directory.

Return type:

GLib.Variant or None

This API will return None if the file is not “resolved” i.e. in a loaded state. It will also return None if this path is not a directory tree.

tree_get_contents_checksum()
Returns:

The SHA256 digest of the content object, or None if this is not a directory.

Return type:

str or None

tree_get_metadata()
Returns:

The GLib.Variant representing the metadata for this directory.

Return type:

GLib.Variant or None

This API will return None if the file is not “resolved” i.e. in a loaded state. It will also return None if this path is not a directory tree.

tree_get_metadata_checksum()
Returns:

The SHA256 digest of the metadata object, or None if this is not a directory.

Return type:

str or None

tree_query_child(n, attributes, flags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success and the out_info is set, False otherwise.

out_info:

the Gio.FileInfo of the child.

Return type:

(bool, out_info: Gio.FileInfo)

tree_set_metadata(checksum, metadata)
Parameters:

Replace the metadata checksum and metadata object.