Basics
Guides
API Reference
Basics
Guides
API Reference
[18:7] extends: object
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].
GFileInputStream (Handle = null)
Creates a new
FileInputStreamby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asInputStream ()
Wraps this handle as
GInputStream.
A GInputStream object.asSeekable ()
Wraps this handle as
GSeekable.
A GSeekable object.query_info (string attributes, object cancellable)
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 g_file_input_stream_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 %G_IO_ERROR_PENDING.
attributes is a file attribute query string..cancellable is optional #GCancellable object, %NULL to ignore..a #GFileInfo, or %NULL on error..query_info_async (string attributes, int io_priority, object cancellable, user_data)
Queries the stream information asynchronously. When the operation is finished @callback will be called. You can then call g_file_input_stream_query_info_finish() to get the result of the operation. For the synchronous version of this function, see g_file_input_stream_query_info(). If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be set
attributes is a file attribute query string..io_priority is the I/O priority of the request.cancellable is optional #GCancellable object, %NULL to ignore..callback is a #GAsyncReadyCallback to call when the request is satisfied.user_data is the data to pass to callback function.None.query_info_finish (object result)
Finishes an asynchronous info query operation.
result is a #GAsyncResult..#GFileInfo..
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.