:right-sidebar: True UnixOutputStream =================================================================== .. currentmodule:: gi.repository.Gio .. class:: UnixOutputStream(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gio.OutputStream`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.FileDescriptorBased`, :class:`~gi.repository.Gio.PollableOutputStream` ``GUnixOutputStream`` implements :obj:`~gi.repository.Gio.OutputStream` for writing to a UNIX file descriptor, including asynchronous operations. (If the file descriptor refers to a socket or pipe, this will use ``poll()`` to do asynchronous I/O. If it refers to a regular file, it will fall back to doing asynchronous I/O in another thread.) Note that ```` belongs to the UNIX-specific GIO interfaces, thus you have to use the ``gio-unix-2.0.pc`` pkg-config file file or the ``GioUnix-2.0`` GIR namespace when using it. Constructors ------------ .. rst-class:: interim-class .. class:: UnixOutputStream :no-index: .. classmethod:: new(fd: int, close_fd: bool) -> ~gi.repository.Gio.OutputStream Creates a new :obj:`~gi.repository.Gio.UnixOutputStream` for the given ``fd``\. If ``close_fd``\, is :const:`True`, the file descriptor will be closed when the output stream is destroyed. :param fd: a UNIX file descriptor :param close_fd: :const:`True` to close the file descriptor when done Methods ------- .. rst-class:: interim-class .. class:: UnixOutputStream :no-index: .. method:: get_close_fd() -> bool Returns whether the file descriptor of ``stream`` will be closed when the stream is closed. .. versionadded:: 2.20 .. method:: get_fd() -> int Return the UNIX file descriptor that the stream writes to. .. versionadded:: 2.20 .. method:: set_close_fd(close_fd: bool) -> None Sets whether the file descriptor of ``stream`` shall be closed when the stream is closed. .. versionadded:: 2.20 :param close_fd: :const:`True` to close the file descriptor when done Properties ---------- .. rst-class:: interim-class .. class:: UnixOutputStream :no-index: .. attribute:: props.close_fd :type: bool The type of the None singleton. .. versionadded:: 2.20 .. attribute:: props.fd :type: int The type of the None singleton. .. versionadded:: 2.20 Fields ------ .. rst-class:: interim-class .. class:: UnixOutputStream :no-index: .. attribute:: parent_instance .. attribute:: priv