GFileInputStream provides input streams that take their content from a file.
GFileInputStream implements Gseekable.Gseekable, 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 g_seekable_tell. To find out if a file input stream supports seeking, use g_seekable_can_seek. To position a file input stream, use g_seekable_seek.
type Gasync_Ready_Callback is access procedure
(Source_Object : access Glib.Object.GObject_Record'Class;
Res : Glib.G_Async_Result);
Type definition for a function that will be called back when an asynchronous operation within GIO has been completed. Gasync_Ready_Callback callbacks from Gtask.Gtask are guaranteed to be invoked in a later iteration of the thread-default main context (see [methodGlib.MainContext.push_thread_default]) where the Gtask.Gtask was created. All other users of Gasync_Ready_Callback must likewise call it asynchronously in a later iteration of the main context. The asynchronous operation is guaranteed to have held a reference to Source_Object from the time when the *_async function was called, until after this callback returns.
the object the asynchronous operation was started with.
a Glib.G_Async_Result.
function Get_Type return Glib.GType
type Gfile_Input_Stream is access all Gfile_Input_Stream_Record'Class;
type Gfile_Input_Stream_Record is new Ginput_Stream_Record with null record;
function Query_Info
(Self : not null access Gfile_Input_Stream_Record;
Attributes : UTF8_String;
Cancellable : access Glib.Cancellable.Gcancellable_Record'Class;
Error : out Glib.Error.GError) return Glib.File_Info.Gfile_Info
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 Glib.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.
a file attribute query string.
optional Glib.Cancellable.Gcancellable object, null to ignore.
the return location for a recoverable error
a Glib.File_Info.Gfile_Info, or null on error. Has transfer-ownership='full'.
procedure Query_Info_Async
(Self : not null access Gfile_Input_Stream_Record;
Attributes : UTF8_String;
Io_Priority : Glib.Gint;
Cancellable : access Glib.Cancellable.Gcancellable_Record'Class;
Callback : Gasync_Ready_Callback)
Queries the stream information asynchronously. When the operation is finished Callback will be called. You can then call Glib.File_Input_Stream.Query_Info_Finish to get the result of the operation. For the synchronous version of this function, see Glib.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
a file attribute query string.
the [I/O priority][io-priority] of the request
optional Glib.Cancellable.Gcancellable object, null to ignore.
a Gasync_Ready_Callback to call when the request is satisfied
function Query_Info_Finish
(Self : not null access Gfile_Input_Stream_Record;
Result : Glib.G_Async_Result;
Error : out Glib.Error.GError) return Glib.File_Info.Gfile_Info
Finishes an asynchronous info query operation.
a Glib.G_Async_Result.
the return location for a recoverable error
Glib.File_Info.Gfile_Info. Has transfer-ownership='full'.