Gio.UnixOutputStream¶
| Subclasses: | None |
|---|
Methods¶
| Inherited: | Gio.OutputStream (29), GObject.Object (37), Gio.FileDescriptorBased (1), Gio.PollableOutputStream (5) |
|---|---|
| Structs: | GObject.ObjectClass (5) |
| class | new (fd, close_fd) |
get_close_fd () |
|
get_fd () |
|
set_close_fd (close_fd) |
Virtual Methods¶
| Inherited: | Gio.OutputStream (15), GObject.Object (7), Gio.FileDescriptorBased (1), Gio.PollableOutputStream (5) |
|---|
Properties¶
| Name | Type | Flags | Short Description |
|---|---|---|---|
close-fd |
bool |
r/w | Whether to close the file descriptor when the stream is closed |
fd |
int |
r/w/co | The file descriptor to write to |
Signals¶
| Inherited: | GObject.Object (1) |
|---|
Fields¶
| Inherited: | GObject.Object (1) |
|---|
| Name | Type | Access | Description |
|---|---|---|---|
| parent_instance | Gio.OutputStream |
r |
Class Details¶
-
class
Gio.UnixOutputStream(**kwargs)¶ Bases: Gio.OutputStream,Gio.FileDescriptorBased,Gio.PollableOutputStreamAbstract: No Structure: Gio.UnixOutputStreamClassGio.UnixOutputStreamimplementsGio.OutputStreamfor 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
<gio/gunixoutputstream.h>belongs to the UNIX-specific GIO interfaces, thus you have to use thegio-unix-2.0.pcpkg-config file when using it.-
classmethod
new(fd, close_fd)[source]¶ Parameters: Returns: a new
Gio.OutputStreamReturn type: Creates a new
Gio.UnixOutputStreamfor the given fd.If close_fd, is
True, the file descriptor will be closed when the output stream is destroyed.
-
get_close_fd()[source]¶ Returns: Trueif the file descriptor is closed when doneReturn type: boolReturns whether the file descriptor of self will be closed when the stream is closed.
New in version 2.20.
-
classmethod
Property Details¶
-
Gio.UnixOutputStream.props.close_fd¶ Name: close-fdType: boolDefault Value: TrueFlags: READABLE,WRITABLEWhether to close the file descriptor when the stream is closed.
New in version 2.20.
-
Gio.UnixOutputStream.props.fd¶ Name: fdType: intDefault Value: -1Flags: READABLE,WRITABLE,CONSTRUCT_ONLYThe file descriptor that the stream writes to.
New in version 2.20.