Synopsis#include <gio/gio.h> GFileOutputStream; GFileInfo* g_file_output_stream_query_info (GFileOutputStream *stream, char *attributes, GCancellable *cancellable, GError **error); void g_file_output_stream_query_info_async (GFileOutputStream *stream, char *attributes, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); GFileInfo* g_file_output_stream_query_info_finish (GFileOutputStream *stream, GAsyncResult *result, GError **error); char* g_file_output_stream_get_etag (GFileOutputStream *stream); DescriptionGFileOutputStream provides output streams that write their content to a file.
GFileOutputStream implements GSeekable, which allows the output
stream to jump to arbitrary positions in the file and to truncate
the file, provided the filesystem of the file supports these
operations. In addition to the generic g_seekable_ API,
GFileOutputStream has its own API for seeking and positioning.
To find the position of a file output stream, use
DetailsGFileOutputStreamtypedef struct _GFileOutputStream GFileOutputStream; A subclass of GOutputStream for opened files. This adds a few file-specific operations and seeking and truncating. GFileOutputStream implements GSeekable.
g_file_output_stream_query_info ()GFileInfo* g_file_output_stream_query_info (GFileOutputStream *stream, char *attributes, GCancellable *cancellable, GError **error);
Queries a file output stream for the given
Can fail if the stream was already closed (with
If
g_file_output_stream_query_info_async ()void g_file_output_stream_query_info_async (GFileOutputStream *stream, char *attributes, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
Asynchronously queries the
For the synchronous version of this function, see
g_file_output_stream_query_info_finish ()GFileInfo* g_file_output_stream_query_info_finish (GFileOutputStream *stream, GAsyncResult *result, GError **error);
Finalizes the asynchronous query started
by
g_file_output_stream_get_etag ()char* g_file_output_stream_get_etag (GFileOutputStream *stream); 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.
|