FileIOStream

GFileIOStream provides io streams that both read and write to the same file handle.

GFileIOStream implements GSeekable, which allows the io stream to jump to arbitrary positions in the file and to truncate the file, provided the filesystem of the file supports these operations.

To find the position of a file io stream, use g_seekable_tell().

To find out if a file io stream supports seeking, use g_seekable_can_seek(). To position a file io stream, use g_seekable_seek(). To find out if a file io stream supports truncating, use g_seekable_can_truncate(). To truncate a file io stream, use g_seekable_truncate().

The default implementation of all the GFileIOStream operations and the implementation of GSeekable just call into the same operations on the output stream.

Constructors

this
this(GFileIOStream* gFileIOStream, bool ownedRef = false)

Sets our main struct and passes it to the parent class.

Members

Functions

getEtag
string getEtag()

Gets the entity tag for the file when it has been written. This must be called after the stream has been written and closed, as the etag can change while writing.

getFileIOStreamStruct
GFileIOStream* getFileIOStreamStruct(bool transferOwnership = false)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

queryInfo
FileInfo queryInfo(string attributes, Cancellable cancellable)

Queries a file io stream for the given attributes. This function blocks while querying the stream. For the asynchronous version of this function, see g_file_io_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.

queryInfoAsync
void queryInfoAsync(string attributes, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously queries the stream for a GFileInfo When completed, callback will be called with a GAsyncResult which can be used to finish the operation with g_file_io_stream_query_info_finish().

queryInfoFinish
FileInfo queryInfoFinish(AsyncResultIF result)

Finalizes the asynchronous query started by g_file_io_stream_query_info_async().

Static functions

getType
GType getType()

Variables

gFileIOStream
GFileIOStream* gFileIOStream;

the main Gtk struct

Meta

Since

2.22