gio.FileInputStreamBase class for implementing streaming inputSynopsisgio.FileInputStreamgio.InputStreamquery_infoattributescancellableNonequery_info_asyncattributescallbackio_priorityglib.PRIORITY_DEFAULTcancellableNoneuser_dataNonequery_info_finishresultAncestry+-- gobject.GObject
+-- gio.InputStream
+-- gio.FileInputStream
Implemented Interfacesgio.FileInputStream
implements
gio.SeekableDescriptiongio.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. In addition to the generic g_seekable_ API,
gio.FileInputStream
has its own API for seeking and positioning. 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().
Methodsgio.FileInputStream.query_infoquery_infoattributescancellableNoneattributes :a file attribute query string.
cancellable :optional
gio.Cancellable
object, None to ignore.
Returns :a gio.FileInfo,
or None on error.
The query_info() method 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.ERROR_PENDING.
gio.FileInputStream.query_info_asyncquery_info_asyncattributescallbackio_priorityglib.PRIORITY_DEFAULTcancellableNoneuser_dataNoneattributes :a file attribute query string.
callback :a GAsyncReadyCallback to call when the request is satisfied.
io_priority :the
of the request.
cancellable :optional
gio.Cancellable
object, None to ignore.user_data :the data to pass to callback function.
The query_info_async() method 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.ERROR_CANCELLED will be set
gio.FileInputStream.query_info_finishquery_info_finishresultresult :a gio.AsyncResult.
Returns :a gio.FileInfo,
or None on error.
The query_info_finish() method finishes an asynchronous
file append operation started with
gio.FileInputStream.query_info_async().