:right-sidebar: True FileInputStream =================================================================== .. currentmodule:: gi.repository.Gio .. class:: FileInputStream(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gio.InputStream`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.Seekable` ``GFileInputStream`` provides input streams that take their content from a file. ``GFileInputStream`` implements :obj:`~gi.repository.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 :obj:`~gi.repository.Gio.Seekable.tell`\. To find out if a file input stream supports seeking, use :obj:`~gi.repository.Gio.Seekable.can_seek`\. To position a file input stream, use :obj:`~gi.repository.Gio.Seekable.seek`\. Methods ------- .. rst-class:: interim-class .. class:: FileInputStream :no-index: .. method:: do_can_seek(self) -> bool .. method:: do_query_info(self, attributes: str, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> ~gi.repository.Gio.FileInfo :param attributes: :param cancellable: .. method:: do_query_info_async(self, attributes: str, io_priority: int, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None :param attributes: :param io_priority: :param cancellable: :param callback: :param user_data: .. method:: do_query_info_finish(self, result: ~gi.repository.Gio.AsyncResult) -> ~gi.repository.Gio.FileInfo :param result: .. method:: do_seek(self, offset: int, type: ~gi.repository.GLib.SeekType, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> bool :param offset: :param type: :param cancellable: .. method:: do_tell(self) -> int .. method:: query_info(attributes: str, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> ~gi.repository.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 :func:`~gi.repository.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 :const:`~gi.repository.Gio.IOErrorEnum.PENDING`. :param attributes: a file attribute query string. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. .. method:: query_info_async(attributes: str, io_priority: int, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Queries the stream information asynchronously. When the operation is finished ``callback`` will be called. You can then call :func:`~gi.repository.Gio.FileInputStream.query_info_finish` to get the result of the operation. For the synchronous version of this function, see :func:`~gi.repository.Gio.FileInputStream.query_info`. If ``cancellable`` is not :const:`None`, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error :const:`~gi.repository.Gio.IOErrorEnum.CANCELLED` will be set :param attributes: a file attribute query string. :param io_priority: the `I/O priority `__ of the request :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback` to call when the request is satisfied :param user_data: the data to pass to callback function .. method:: query_info_finish(result: ~gi.repository.Gio.AsyncResult) -> ~gi.repository.Gio.FileInfo Finishes an asynchronous info query operation. :param result: a :obj:`~gi.repository.Gio.AsyncResult`\. Virtual Methods --------------- .. rst-class:: interim-class .. class:: FileInputStream :no-index: .. method:: do_can_seek() -> bool .. method:: do_query_info(attributes: str, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> ~gi.repository.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 :func:`~gi.repository.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 :const:`~gi.repository.Gio.IOErrorEnum.PENDING`. :param attributes: a file attribute query string. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. .. method:: do_query_info_async(attributes: str, io_priority: int, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Queries the stream information asynchronously. When the operation is finished ``callback`` will be called. You can then call :func:`~gi.repository.Gio.FileInputStream.query_info_finish` to get the result of the operation. For the synchronous version of this function, see :func:`~gi.repository.Gio.FileInputStream.query_info`. If ``cancellable`` is not :const:`None`, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error :const:`~gi.repository.Gio.IOErrorEnum.CANCELLED` will be set :param attributes: a file attribute query string. :param io_priority: the `I/O priority `__ of the request :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback` to call when the request is satisfied :param user_data: the data to pass to callback function .. method:: do_query_info_finish(result: ~gi.repository.Gio.AsyncResult) -> ~gi.repository.Gio.FileInfo Finishes an asynchronous info query operation. :param result: a :obj:`~gi.repository.Gio.AsyncResult`\. .. method:: do_seek(offset: int, type: ~gi.repository.GLib.SeekType, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> bool :param offset: :param type: :param cancellable: .. method:: do_tell() -> int Fields ------ .. rst-class:: interim-class .. class:: FileInputStream :no-index: .. attribute:: parent_instance .. attribute:: priv