Gsf.Infile

g GObject.Object GObject.Object Gsf.Input Gsf.Input GObject.Object->Gsf.Input Gsf.Infile Gsf.Infile Gsf.Input->Gsf.Infile

Subclasses:Gsf.InfileMSOle, Gsf.InfileMSVBA, Gsf.InfileStdio, Gsf.InfileTar, Gsf.InfileZip, Gsf.StructuredBlob

Virtual Methods

Inherited:Gsf.Input (3), GObject.Object (7)
  do_name_by_index (i)
  do_num_children ()

Properties

Inherited:Gsf.Input (7)

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent Gsf.Input r  

Class Details

class Gsf.Infile(**kwargs)
Bases:Gsf.Input
Abstract:Yes
Structure:Gsf.InfileClass

Class representing an input file.

child_by_aname(names)
Parameters:names ([str]) – A None terminated array of names (e.g. from g_strsplit)
Returns:a newly created child which must be unrefed.
Return type:Gsf.Input

This function finds a child that is several directory levels down the tree. If, for example, the names “foo”, “bar”, and “baz” are given, then this function first finds the “foo” directory in the root infile, then locates “bar” within that directory, and finally locates “baz” within that and returns the “baz” child. In other words, this function finds the “foo/bar/baz” child.

New in 1.14.9.

child_by_index(i)
Parameters:i (int) – target index
Returns:a newly created child which must be unrefed.
Return type:Gsf.Input

TODO : For 2.0 api will change to include a GLib.Error.

child_by_name(name)
Parameters:name (str) – target name
Returns:a newly created child which must be unrefed.
Return type:Gsf.Input

The function returns a named child of the given infile. This only works for an immediate child. If you need to go several levels down use Gsf.Infile.child_by_aname, for example.

TODO : For 2.0 api will change to include a GLib.Error.

name_by_index(i)
Parameters:i (int) – zero-based index of child to find.
Returns:the utf8 encoded name of the i-th child
Return type:str or None
num_children()
Returns:the number of children the storage has, or -1 if the storage can not have children.
Return type:int
do_name_by_index(i) virtual
Parameters:i (int) – zero-based index of child to find.
Returns:the utf8 encoded name of the i-th child
Return type:str or None
do_num_children() virtual
Returns:the number of children the storage has, or -1 if the storage can not have children.
Return type:int