Gio.OutputStream

const Gio = imports.gi.Gio;

let outputStream = new Gio.OutputStream();
  

Gio.OutputStream has functions to write to a stream (Gio.OutputStream.prototype.write), to close a stream (Gio.OutputStream.prototype.close) and to flush pending writes (Gio.OutputStream.prototype.flush).

To copy the content of an input stream to an output stream without manually handling the reads and writes, use Gio.OutputStream.prototype.splice.

All of these functions have async variants too.

Hierarchy

  • GObject.Object
    • Gio.OutputStream