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) | 
|---|
Class Details¶
- 
class Gio.FileInputStream(**kwargs)¶
- Bases: - Gio.InputStream,- Gio.Seekable- Abstract: - No - Structure: - Gio.FileInputStreamClass- Gio.FileInputStreamprovides input streams that take their content from a file.- Gio.FileInputStreamimplements- 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: - attributes (str) – a file attribute query string.
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore.
 - Raises: - Returns: - a - Gio.FileInfo, or- Noneon error.- Return type: - 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.
- attributes (
 - 
query_info_async(attributes, io_priority, cancellable, callback, *user_data)[source]¶
- Parameters: - attributes (str) – a file attribute query string.
- io_priority (int) – the I/O priority of the request
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore.
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when the request is satisfied
- user_data (objectorNone) – the data to pass to callback function
 - 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.CANCELLEDwill be set
- attributes (
 - 
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_query_info(attributes, cancellable) virtual¶
- Parameters: - attributes (str) – a file attribute query string.
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore.
 - Returns: - a - Gio.FileInfo, or- Noneon error.- Return type: - 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.
- attributes (
 - 
do_query_info_async(attributes, io_priority, cancellable, callback, *user_data) virtual¶
- Parameters: - attributes (str) – a file attribute query string.
- io_priority (int) – the I/O priority of the request
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore.
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when the request is satisfied
- user_data (objectorNone) – the data to pass to callback function
 - 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.CANCELLEDwill be set
- attributes (
 - 
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: - offset (int) –
- type (GLib.SeekType) –
- cancellable (Gio.CancellableorNone) –
 - Return type: 
- offset (
 
-