Functions¶
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Details¶
- Dex.aio_read(aio_context, fd, offset)¶
 - Parameters:
 aio_context (
Dex.AioContext) –fd (
int) –offset (
int) –
- Returns:
 a future that will resolve when the read completes or rejects with error.
- Return type:
 (
Dex.Future, buffer:bytes)
An asynchronous
pread()wrapper.
- Dex.aio_write(aio_context, fd, buffer, offset)¶
 - Parameters:
 aio_context (
Dex.AioContext) –fd (
int) –buffer (
bytes) –offset (
int) –
- Returns:
 a future that will resolve when the write completes or rejects with error.
- Return type:
 
An asynchronous
pwrite()wrapper.
- Dex.bus_get(bus_type)¶
 - Parameters:
 bus_type (
Gio.BusType) –- Returns:
 a
Dex.Futurethat resolves to aGio.DBusConnectionor rejects with error.- Return type:
 
Wrapper for
Gio.bus_get().New in version 0.4.
- Dex.dbus_connection_call(connection, bus_name, object_path, interface_name, method_name, parameters, reply_type, flags, timeout_msec)¶
 - Parameters:
 connection (
Gio.DBusConnection) –object_path (
str) –interface_name (
str) –method_name (
str) –parameters (
GLib.VariantorNone) –reply_type (
GLib.VariantTypeorNone) –flags (
Gio.DBusCallFlags) –timeout_msec (
int) –
- Returns:
 a
Dex.Futurethat resolves to aGLib.Variantor rejects with error.- Return type:
 
Wrapper for
Gio.DBusConnection.call().New in version 0.4.
- Dex.dbus_connection_call_with_unix_fd_list(connection, bus_name, object_path, interface_name, method_name, parameters, reply_type, flags, timeout_msec, fd_list)¶
 - Parameters:
 connection (
Gio.DBusConnection) –object_path (
str) –interface_name (
str) –method_name (
str) –parameters (
GLib.VariantorNone) –reply_type (
GLib.VariantTypeorNone) –flags (
Gio.DBusCallFlags) –timeout_msec (
int) –fd_list (
Gio.UnixFDListorNone) – aGio.UnixFDList
- Returns:
 a
Dex.FutureSetthat resolves to aGLib.Variant. TheDex.Futurecontaining the resultingGio.UnixFDListcan be retrieved withDex.FutureSet.get_future_at() with an index of 1.- Return type:
 
Wrapper for
Gio.DBusConnection.call_with_unix_fd_list().New in version 0.4.
- Dex.dbus_connection_send_message_with_reply(connection, message, flags, timeout_msec)¶
 - Parameters:
 connection (
Gio.DBusConnection) – aGio.DBusConnectionmessage (
Gio.DBusMessage) – aGio.DBusMessageflags (
Gio.DBusSendMessageFlags) – flags for messagetimeout_msec (
int) – timeout in milliseconds, or -1 for default, orGObject.G_MAXINTfor no timeout.
- Returns:
 a
Dex.Futurethat will resolve to aGio.DBusMessageor reject with failure.- out_serial:
 a location for the message serial number
- Return type:
 (
Dex.Future, out_serial:int)
Wrapper for
Gio.DBusConnection.send_message_with_reply().New in version 0.4.
- Dex.file_copy(source, destination, flags, io_priority)¶
 - Parameters:
 flags (
Gio.FileCopyFlags) – theGio.FileCopyFlagsio_priority (
int) – IO priority such asGLib.PRIORITY_DEFAULT
- Returns:
 - Return type:
 
Asynchronously copies a file and returns a
Dex.Futurewhich can be observed for the result.
- Dex.file_delete(file, io_priority)¶
 - Parameters:
 io_priority (
int) – IO priority such asGLib.PRIORITY_DEFAULT
- Returns:
 - Return type:
 
Asynchronously deletes a file and returns a
Dex.Futurewhich can be observed for the result.
- Dex.file_enumerate_children(file, attributes, flags, io_priority)¶
 - Parameters:
 file (
Gio.File) –attributes (
str) –flags (
Gio.FileQueryInfoFlags) –io_priority (
int) –
- Returns:
 - Return type:
 
- Dex.file_enumerator_next_files(file_enumerator, num_files, io_priority)¶
 - Parameters:
 file_enumerator (
Gio.FileEnumerator) –num_files (
int) –io_priority (
int) –
- Returns:
 - Return type:
 
- Dex.file_make_directory(file, io_priority)¶
 - Parameters:
 io_priority (
int) – IO priority such asGLib.PRIORITY_DEFAULT
- Returns:
 - Return type:
 
Asynchronously creates a directory and returns
Dex.Futurewhich can be observed for the result.
- Dex.file_query_exists(file)¶
 - Parameters:
 - Returns:
 a
Dex.Futurethat will resolve withTrueif the file exists, otherwise reject with error.- Return type:
 
Queries to see if file exists asynchronously.
New in version 0.6.
- Dex.file_query_info(file, attributes, flags, io_priority)¶
 - Parameters:
 file (
Gio.File) –attributes (
str) –flags (
Gio.FileQueryInfoFlags) –io_priority (
int) –
- Returns:
 - Return type:
 
- Dex.file_read(file, io_priority)¶
 - Parameters:
 io_priority (
int) – IO priority such asGLib.PRIORITY_DEFAULT
- Returns:
 - Return type:
 
Asynchronously opens a file for reading.
- Dex.file_replace(file, etag, make_backup, flags, io_priority)¶
 - Parameters:
 - Returns:
 - Return type:
 
- Dex.file_replace_contents_bytes(file, contents, etag, make_backup, flags)¶
 - Parameters:
 contents (
GLib.Bytes) – aGLib.Bytesmake_backup (
bool) – if a backup file should be createdflags (
Gio.FileCreateFlags) – A set ofGio.FileCreateFlags
- Returns:
 a
Dex.Futurewhich resolves to the new etag. Therefore, it is possible to beNonewithout an error having occurred.- Return type:
 
- Dex.init()¶
 
- Dex.input_stream_close(self, io_priority)¶
 - Parameters:
 self (
Gio.InputStream) –io_priority (
int) –
- Returns:
 - Return type:
 
- Dex.input_stream_read(self, io_priority)¶
 - Parameters:
 self (
Gio.InputStream) –io_priority (
int) –
- Returns:
 - Return type:
 (
Dex.Future, buffer:bytes)
- Dex.input_stream_read_bytes(self, count, io_priority)¶
 - Parameters:
 self (
Gio.InputStream) –count (
int) –io_priority (
int) –
- Returns:
 - Return type:
 
- Dex.input_stream_skip(self, count, io_priority)¶
 - Parameters:
 self (
Gio.InputStream) –count (
int) – the number of bytes to skipio_priority (
int) –GLib.PRIORITY_DEFAULTor similar priority value
- Returns:
 - Return type:
 
- Dex.io_stream_close(io_stream, io_priority)¶
 - Parameters:
 io_stream (
Gio.IOStream) –io_priority (
int) –
- Returns:
 - Return type:
 
- Dex.output_stream_close(self, io_priority)¶
 - Parameters:
 self (
Gio.OutputStream) –io_priority (
int) –
- Returns:
 - Return type:
 
- Dex.output_stream_splice(output, input, flags, io_priority)¶
 - Parameters:
 output (
Gio.OutputStream) –input (
Gio.InputStream) –flags (
Gio.OutputStreamSpliceFlags) –io_priority (
int) –
- Returns:
 - Return type:
 
- Dex.output_stream_write(self, buffer, io_priority)¶
 - Parameters:
 self (
Gio.OutputStream) –buffer (
bytes) –io_priority (
int) –
- Returns:
 - Return type:
 
- Dex.output_stream_write_bytes(self, bytes, io_priority)¶
 - Parameters:
 self (
Gio.OutputStream) –bytes (
GLib.Bytes) –io_priority (
int) –
- Returns:
 - Return type:
 
- Dex.resolver_lookup_by_name(resolver, address)¶
 - Parameters:
 resolver (
Gio.Resolver) –address (
str) –
- Returns:
 - Return type:
 
- Dex.socket_client_connect(socket_client, socket_connectable)¶
 - Parameters:
 socket_client (
Gio.SocketClient) –socket_connectable (
Gio.SocketConnectable) –
- Returns:
 - Return type:
 
- Dex.socket_listener_accept(listener)¶
 - Parameters:
 listener (
Gio.SocketListener) –- Returns:
 - Return type:
 
- Dex.subprocess_wait_check(subprocess)¶
 - Parameters:
 subprocess (
Gio.Subprocess) – aGio.Subprocess- Returns:
 a
Dex.Futurethat will resolve when subprocess exits cleanly or reject upon signal or non-successful exit.- Return type:
 
Creates a future that awaits for subprocess to complete using
Gio.Subprocess.wait_check_async().New in version 0.4.
- Dex.value_get_object(value)¶
 - Parameters:
 value (
GObject.Value) – aGValueinitialized with typeDEX_TYPE_OBJECT- Returns:
 a
DexObject- Return type:
 Dex.ObjectorNone
Retrieves the
DexObjectstored inside the givenvalue.New in version 0.4.
- Dex.value_set_object(value, object)¶
 - Parameters:
 value (
GObject.Value) – a [struct`GObject`.Value] initialized with typeDEX_TYPE_OBJECTobject (
Dex.ObjectorNone) – aDexObjectorNone
Stores the given
DexObjectinsidevalue.The [struct`GObject`.Value] will acquire a reference to the
object.New in version 0.4.
- Dex.value_take_object(value, object)¶
 - Parameters:
 value (
GObject.Value) – a [struct`GObject`.Value] initialized with typeDEX_TYPE_OBJECTobject (
Dex.ObjectorNone) – aDexObject
Stores the given
DexObjectinsidevalue.This function transfers the ownership of the
objectto theGValue.New in version 0.4.