Ags.File¶
- Subclasses:
 None
Methods¶
- Inherited:
 - Structs:
 
class  | 
  | 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
Properties¶
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w  | 
The audio encoding used by embedded audio  | 
||
r/w  | 
The audio format used by embedded audio  | 
||
r/w  | 
The encoding of the XML document  | 
||
r/w  | 
The filename to read or write to  | 
||
r/w  | 
The xml document assigned with file  | 
Signals¶
- Inherited:
 
Name  | 
Short Description  | 
|---|---|
Open file with appropriate filename.  | 
|
Open file from a buffer containing the file.  | 
|
Read a XML document from disk with specified filename.  | 
|
Resolve XPath expressions to their counterpart the newly created instances refering to.  | 
|
Hook after reading XML document to update or start the application.  | 
|
Write XML Document to disk.  | 
|
Resolve references and generate thus XPath expressions just before writing to disk.  | 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
app_encoding  | 
r  | 
||
audio_encoding  | 
r  | 
||
audio_format  | 
r  | 
||
buffer  | 
r  | 
||
client  | 
r  | 
||
clipboard  | 
r  | 
||
cluster  | 
r  | 
||
doc  | 
r  | 
||
dtd  | 
r  | 
||
embedded_audio  | 
[  | 
r  | 
|
encoding  | 
r  | 
||
file_link  | 
[  | 
r  | 
|
filename  | 
r  | 
||
flags  | 
r  | 
||
gobject  | 
r  | 
||
history  | 
r  | 
||
id_refs  | 
[  | 
r  | 
|
launch  | 
[  | 
r  | 
|
lookup  | 
[  | 
r  | 
|
obj_mutex  | 
r  | 
||
out  | 
r  | 
||
property  | 
[  | 
r  | 
|
read_charset_converter  | 
r  | 
||
root_node  | 
r  | 
||
script  | 
[  | 
r  | 
|
server  | 
r  | 
||
write_charset_converter  | 
r  | 
Class Details¶
- class Ags.File(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
- classmethod str2md5(content, content_length)¶
 - Parameters:
 - Returns:
 the md5 checksum
- Return type:
 
Compute MD5 sums of a buffer.
New in version 3.0.0.
- add_id_ref(id_ref)¶
 - Parameters:
 id_ref (
GObject.Object) – a reference
Adds id_ref to self.
New in version 3.0.0.
- add_launch(file_launch)¶
 - Parameters:
 file_launch (
GObject.Object) – aAgs.FileLaunch
Add file_launch for later invoking.
New in version 3.0.0.
- add_lookup(file_lookup)¶
 - Parameters:
 file_lookup (
GObject.Object) – aAgs.FileLookup
Add file_lookup for later invoking.
New in version 3.0.0.
- close()¶
 Closes self.
New in version 3.0.0.
- find_id_ref_by_node(node)¶
 - Parameters:
 node (
libxml2.Node) – a XML node- Returns:
 the matching
GObject.Object- Return type:
 
Find a reference by its XML node.
New in version 3.0.0.
- find_id_ref_by_reference(ref)¶
 - Parameters:
 - Returns:
 the matching
GObject.Object- Return type:
 
Find a reference matching ref.
New in version 3.0.0.
- find_id_ref_by_xpath(xpath)¶
 - Parameters:
 xpath (
str) – a XPath expression- Returns:
 the matching
GObject.Object- Return type:
 
Lookup a reference by xpath.
New in version 3.0.0.
- get_audio_encoding()¶
 - Returns:
 the audio encoding
- Return type:
 
Get audio encoding of self.
New in version 3.6.17.
- get_audio_format()¶
 - Returns:
 the audio format
- Return type:
 
Get audio format of self.
New in version 3.6.17.
- get_xml_doc()¶
 - Returns:
 the
libxml2.Doc-struct- Return type:
 
Get xml doc of self.
New in version 3.6.17.
- open_filename(filename)¶
 - Parameters:
 filename (
str) – a path
Opens the file specified by filename property.
New in version 3.0.0.
- open_from_data(data, length)¶
 - Parameters:
 - Raises:
 
Opens the file provided by data.
New in version 3.0.0.
- read()¶
 Read XML document from disk.
New in version 3.0.0.
- read_application_context(node, application_context)¶
 - Parameters:
 node (
libxml2.Node) –application_context (
GObject.Object) –
- read_config(node, ags_config)¶
 - Parameters:
 node (
libxml2.Node) –ags_config (
GObject.Object) –
- read_resolve()¶
 
- read_start()¶
 Update or start the application.
New in version 3.0.0.
- rw_open(create)¶
 - Parameters:
 - Raises:
 
Opens the file specified by
:filenameproperty in read-write mode.New in version 3.0.0.
- set_audio_encoding(audio_encoding)¶
 - Parameters:
 audio_encoding (
str) – the audio encoding
Set audio_encoding of self.
New in version 3.6.17.
- set_audio_format(audio_format)¶
 - Parameters:
 audio_format (
str) – the audio format
Set audio_format of self.
New in version 3.6.17.
- set_encoding(encoding)¶
 - Parameters:
 encoding (
str) – the encoding
Set encoding of self.
New in version 3.6.17.
- set_filename(filename)¶
 - Parameters:
 filename (
str) – the filename
Set filename of self.
New in version 3.6.17.
- set_xml_doc(xml_doc)¶
 - Parameters:
 xml_doc (
libxml2.Doc) – thelibxml2.Doc-struct
Set xml_doc of self.
New in version 3.6.17.
- write()¶
 Write the XML document to disk.
New in version 3.0.0.
- write_application_context(parent, application_context)¶
 - Parameters:
 parent (
libxml2.Node) –application_context (
GObject.Object) –
- write_concurrent()¶
 
- write_config(parent, ags_config)¶
 - Parameters:
 parent (
libxml2.Node) –ags_config (
GObject.Object) –
- write_resolve()¶
 Resolve references to XPath expressions.
New in version 3.0.0.
- xml_add_child(parent, child)¶
 - Parameters:
 parent (
libxml2.Node) – the parentlibxml2.Node-structchild (
libxml2.Node) – the childlibxml2.Node-struct
Set root element root_node of doc.
New in version 4.0.0.
- xml_get_content(node)¶
 - Parameters:
 node (
libxml2.Node) – thelibxml2.Node-struct- Returns:
 the content of
libxml2.Node-struct- Return type:
 
Get content of node.
New in version 4.0.0.
- xml_get_node_name(node)¶
 - Parameters:
 node (
libxml2.Node) – thelibxml2.Node-struct- Returns:
 the node name of
libxml2.Node-struct- Return type:
 
Get node name of node.
New in version 4.0.0.
- xml_get_prop(node, prop_name)¶
 - Parameters:
 node (
libxml2.Node) – thelibxml2.Node-structprop_name (
str) – property name
- Returns:
 the property of
libxml2.Node-struct- Return type:
 
Get property of node.
New in version 4.0.0.
- xml_get_root_element(doc)¶
 - Parameters:
 doc (
libxml2.Doc) – thelibxml2.Doc-struct- Returns:
 the root element of
libxml2.Doc-struct- Return type:
 
Get root element of doc.
New in version 4.0.0.
- xml_set_content(node, content, is_cdata)¶
 - Parameters:
 node (
libxml2.Node) – thelibxml2.Node-structcontent (
str) – the contentis_cdata (
bool) – if content is CDATA
Set content of node.
New in version 4.0.0.
- xml_set_prop(node, prop_name, prop_value)¶
 - Parameters:
 node (
libxml2.Node) – thelibxml2.Node-structprop_name (
str) – property nameprop_value (
str) – property value
Set property of node.
New in version 4.0.0.
- xml_set_root_element(doc, root_node)¶
 - Parameters:
 doc (
libxml2.Doc) – thelibxml2.Doc-structroot_node (
libxml2.Node) – thelibxml2.Node-struct as root node
Set root element root_node of doc.
New in version 4.0.0.
- do_open_from_data(data, length) virtual¶
 - 
Opens the file provided by data.
New in version 3.0.0.
 
- do_read() virtual¶
 Read XML document from disk.
New in version 3.0.0.
- do_read_resolve() virtual¶
 
- do_read_start() virtual¶
 Update or start the application.
New in version 3.0.0.
- do_rw_open(create) virtual¶
 - 
Opens the file specified by
:filenameproperty in read-write mode.New in version 3.0.0.
 
- do_write() virtual¶
 Write the XML document to disk.
New in version 3.0.0.
- do_write_concurrent() virtual¶
 
- do_write_resolve() virtual¶
 Resolve references to XPath expressions.
New in version 3.0.0.
Signal Details¶
- Ags.File.signals.open(file, error)¶
 - Signal Name:
 open- Flags:
 - Parameters:
 file (
Ags.File) – The object which received the signalerror (
objectorNone) – aGLib.Error-struct pointer to return error
Open file with appropriate filename.
New in version 3.0.0.
- Ags.File.signals.open_from_data(file, data, length, error)¶
 - Signal Name:
 open-from-data- Flags:
 - Parameters:
 
Open file from a buffer containing the file.
New in version 3.0.0.
- Ags.File.signals.read(file)¶
 - Signal Name:
 read- Flags:
 - Parameters:
 file (
Ags.File) – The object which received the signal
Read a XML document from disk with specified filename.
New in version 3.0.0.
- Ags.File.signals.read_resolve(file)¶
 - Signal Name:
 read-resolve- Flags:
 - Parameters:
 file (
Ags.File) – The object which received the signal
Resolve XPath expressions to their counterpart the newly created instances refering to.
New in version 3.0.0.
- Ags.File.signals.read_start(file)¶
 - Signal Name:
 read-start- Flags:
 - Parameters:
 file (
Ags.File) – The object which received the signal
Hook after reading XML document to update or start the application.
New in version 3.0.0.
- Ags.File.signals.rw_open(file, object, p0)¶
 
- Ags.File.signals.write(file)¶
 - Signal Name:
 write- Flags:
 - Parameters:
 file (
Ags.File) – The object which received the signal
Write XML Document to disk.
New in version 3.0.0.
- Ags.File.signals.write_concurrent(file)¶
 
Property Details¶
- Ags.File.props.audio_encoding¶
 - 
The encoding to use for embedding audio data.
New in version 3.0.0.
 
- Ags.File.props.audio_format¶
 - 
The format of embedded audio data.
New in version 3.0.0.
 
- Ags.File.props.encoding¶
 - 
The charset encoding to use.
New in version 3.0.0.
 
- Ags.File.props.filename¶
 - 
The assigned filename to open and read from.
New in version 3.0.0.