Foundry.TemplateOutput

g Foundry.TemplateOutput Foundry.TemplateOutput GObject.Object GObject.Object GObject.Object->Foundry.TemplateOutput

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (file, contents, mode)

class

new_directory (file)

dup_contents ()

dup_file ()

get_mode ()

write ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

contents

GLib.Bytes

r

file

Gio.File

r

mode

int

r

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Foundry.TemplateOutput(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Foundry.TemplateOutputClass

classmethod new(file, contents, mode)
Parameters:
  • file (Gio.File) – a [iface`Gio`.File] to write to

  • contents (GLib.Bytes) – the contents to write as an immutable byte buffer

  • mode (int) – the file mode (or -1 to use the default)

Return type:

Foundry.TemplateOutput

classmethod new_directory(file)
Parameters:

file (Gio.File) –

Return type:

Foundry.TemplateOutput

dup_contents()
Return type:

GLib.Bytes

dup_file()
Return type:

Gio.File

get_mode()
Return type:

int

The mode for the file or -1 to ignore the mode.

write()
Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Writes the output contents to the destination file.

Property Details

Foundry.TemplateOutput.props.contents
Name:

contents

Type:

GLib.Bytes

Default Value:

None

Flags:

READABLE

Foundry.TemplateOutput.props.file
Name:

file

Type:

Gio.File

Default Value:

None

Flags:

READABLE

Foundry.TemplateOutput.props.mode
Name:

mode

Type:

int

Default Value:

0

Flags:

READABLE