Gio.FileInputStream

g GObject.GInterface GObject.GInterface Gio.Seekable Gio.Seekable GObject.GInterface->Gio.Seekable GObject.Object GObject.Object Gio.InputStream Gio.InputStream GObject.Object->Gio.InputStream Gio.FileInputStream Gio.FileInputStream Gio.InputStream->Gio.FileInputStream Gio.Seekable->Gio.FileInputStream

Subclasses:

None

Methods

Inherited:

Gio.InputStream (19), GObject.Object (37), Gio.Seekable (5)

Structs:

GObject.ObjectClass (5)

query_info (attributes, cancellable)

query_info_async (attributes, io_priority, cancellable, callback, *user_data)

query_info_finish (result)

Virtual Methods

Inherited:

Gio.InputStream (9), GObject.Object (7), Gio.Seekable (5)

do_can_seek ()

do_query_info (attributes, cancellable)

do_query_info_async (attributes, io_priority, cancellable, callback, *user_data)

do_query_info_finish (result)

do_seek (offset, type, cancellable)

do_tell ()

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gio.InputStream

r

Class Details

class Gio.FileInputStream(**kwargs)
Bases:

Gio.InputStream, Gio.Seekable

Abstract:

No

Structure:

Gio.FileInputStreamClass

Gio.FileInputStream provides input streams that take their content from a file.

Gio.FileInputStream implements Gio.Seekable, which allows the input stream to jump to arbitrary positions in the file, provided the filesystem of the file allows it. To find the position of a file input stream, use Gio.Seekable.tell(). To find out if a file input stream supports seeking, use Gio.Seekable.can_seek(). To position a file input stream, use Gio.Seekable.seek().

query_info(attributes, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

a Gio.FileInfo, or None on error.

Return type:

Gio.FileInfo

Queries a file input stream the given attributes. This function blocks while querying the stream. For the asynchronous (non-blocking) version of this function, see Gio.FileInputStream.query_info_async(). While the stream is blocked, the stream will set the pending flag internally, and any other operations on the stream will fail with Gio.IOErrorEnum.PENDING.

query_info_async(attributes, io_priority, cancellable, callback, *user_data)[source]
Parameters:

Queries the stream information asynchronously. When the operation is finished callback will be called. You can then call Gio.FileInputStream.query_info_finish() to get the result of the operation.

For the synchronous version of this function, see Gio.FileInputStream.query_info().

If cancellable is not None, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error Gio.IOErrorEnum.CANCELLED will be set

query_info_finish(result)[source]
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult.

Raises:

GLib.Error

Returns:

Gio.FileInfo.

Return type:

Gio.FileInfo

Finishes an asynchronous info query operation.

do_can_seek() virtual
Return type:

bool

do_query_info(attributes, cancellable) virtual
Parameters:
Returns:

a Gio.FileInfo, or None on error.

Return type:

Gio.FileInfo

Queries a file input stream the given attributes. This function blocks while querying the stream. For the asynchronous (non-blocking) version of this function, see Gio.FileInputStream.query_info_async(). While the stream is blocked, the stream will set the pending flag internally, and any other operations on the stream will fail with Gio.IOErrorEnum.PENDING.

do_query_info_async(attributes, io_priority, cancellable, callback, *user_data) virtual
Parameters:

Queries the stream information asynchronously. When the operation is finished callback will be called. You can then call Gio.FileInputStream.query_info_finish() to get the result of the operation.

For the synchronous version of this function, see Gio.FileInputStream.query_info().

If cancellable is not None, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error Gio.IOErrorEnum.CANCELLED will be set

do_query_info_finish(result) virtual
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult.

Returns:

Gio.FileInfo.

Return type:

Gio.FileInfo

Finishes an asynchronous info query operation.

do_seek(offset, type, cancellable) virtual
Parameters:
Return type:

bool

do_tell() virtual
Return type:

int