Mirage.FileStream

g GObject.GInterface GObject.GInterface Mirage.Contextual Mirage.Contextual GObject.GInterface->Mirage.Contextual Mirage.Stream Mirage.Stream GObject.GInterface->Mirage.Stream GObject.Object GObject.Object Mirage.Object Mirage.Object GObject.Object->Mirage.Object Mirage.Contextual->Mirage.Object Mirage.FileStream Mirage.FileStream Mirage.Object->Mirage.FileStream Mirage.Stream->Mirage.FileStream

Subclasses:

None

Methods

Inherited:

Mirage.Object (2), GObject.Object (37), Mirage.Contextual (8), Mirage.Stream (8)

Structs:

GObject.ObjectClass (5)

open (filename, writable)

Virtual Methods

Inherited:

GObject.Object (7), Mirage.Contextual (2), Mirage.Stream (7)

Properties

None

Signals

Inherited:

Mirage.Object (1), GObject.Object (1)

Fields

Inherited:

Mirage.Object (1), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Mirage.Object

r

Class Details

class Mirage.FileStream(**kwargs)
Bases:

Mirage.Object, Mirage.Stream

Abstract:

No

Structure:

Mirage.FileStreamClass

All the fields in the Mirage.FileStream structure are private to the Mirage.FileStream implementation and should never be accessed directly.

open(filename, writable)
Parameters:
  • filename (str) – name of file on which the stream is to be opened

  • writable (bool) – a boolean indicating whether stream should be opened for read/write access

Raises:

GLib.Error

Returns:

True on success, False on failure.

Return type:

bool

Opens the stream on the file pointed to by filename. If writable is False, the stream is opened in read-only mode; if writable is True, the stream is opened in read-write mode.