Gio.FileInputStream¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Gio.FileInputStream(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
GFileInputStream
provides input streams that take their content from a file.GFileInputStream
implements [iface`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 [method`Gio`.Seekable.tell]. To find out if a file input stream supports seeking, use [vfunc`Gio`.Seekable.can_seek]. To position a file input stream, use [vfunc`Gio`.Seekable.seek].- query_info(attributes, cancellable)[source]¶
- Parameters:
attributes (
str
) – a file attribute query string.cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignore.
- Raises:
- Returns:
a
Gio.FileInfo
, orNone
on 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 withGio.IOErrorEnum.PENDING
.
- 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 requestcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignore.callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – 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 errorGio.IOErrorEnum.CANCELLED
will be set
- query_info_finish(result)[source]¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
.- Raises:
- Returns:
- Return type:
Finishes an asynchronous info query operation.
- do_query_info(attributes, cancellable) virtual¶
- Parameters:
attributes (
str
) – a file attribute query string.cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignore.
- Returns:
a
Gio.FileInfo
, orNone
on 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 withGio.IOErrorEnum.PENDING
.
- 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 requestcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignore.callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – 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 errorGio.IOErrorEnum.CANCELLED
will be set
- do_query_info_finish(result) virtual¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
.- Returns:
- Return type:
Finishes an asynchronous info query operation.
- do_seek(offset, type, cancellable) virtual¶
- Parameters:
offset (
int
) –type (
GLib.SeekType
) –cancellable (
Gio.Cancellable
orNone
) –
- Return type: