Gio.OutputStream.prototype.is_closing

function is_closing(): Boolean {
    // Gjs wrapper for g_output_stream_is_closing()
}
  

Checks if an output stream is being closed. This can be used inside e.g. a flush implementation to see if the flush (or other i/o operation) is called from within the closing operation.

Since 2.24

Returns

true if stream is being closed. false otherwise.