4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>GFileIOStream</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.78.0">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7
7
<link rel="home" href="index.html" title="GIO Reference Manual">
8
8
<link rel="up" href="streaming.html" title="Streaming I/O">
9
9
<link rel="prev" href="GFileOutputStream.html" title="GFileOutputStream">
10
10
<link rel="next" href="GFileDescriptorBased.html" title="GFileDescriptorBased">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
49
49
<a class="link" href="GFileInfo.html" title="GFileInfo"><span class="returnvalue">GFileInfo</span></a> * <a class="link" href="GFileIOStream.html#g-file-io-stream-query-info" title="g_file_io_stream_query_info ()">g_file_io_stream_query_info</a> (<em class="parameter"><code><a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a> *stream</code></em>,
50
50
<em class="parameter"><code>const <span class="type">char</span> *attributes</code></em>,
51
51
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
52
<em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
52
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
53
53
<span class="returnvalue">void</span> <a class="link" href="GFileIOStream.html#g-file-io-stream-query-info-async" title="g_file_io_stream_query_info_async ()">g_file_io_stream_query_info_async</a> (<em class="parameter"><code><a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a> *stream</code></em>,
54
54
<em class="parameter"><code>const <span class="type">char</span> *attributes</code></em>,
55
55
<em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
56
56
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
57
57
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
58
<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
58
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
59
59
<a class="link" href="GFileInfo.html" title="GFileInfo"><span class="returnvalue">GFileInfo</span></a> * <a class="link" href="GFileIOStream.html#g-file-io-stream-query-info-finish" title="g_file_io_stream_query_info_finish ()">g_file_io_stream_query_info_finish</a> (<em class="parameter"><code><a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a> *stream</code></em>,
60
60
<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
61
<em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
61
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
64
64
<div class="refsect1">
65
65
<a name="GFileIOStream.object-hierarchy"></a><h2>Object Hierarchy</h2>
66
66
<pre class="synopsis">
67
<a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
67
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
68
68
+----<a class="link" href="GIOStream.html" title="GIOStream">GIOStream</a>
126
126
This must be called after the stream has been written
127
127
and closed, as the etag can change while writing.
129
<div class="variablelist"><table border="0" class="variablelist">
129
<div class="variablelist"><table border="0">
131
130
<col align="left" valign="top">
136
133
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
150
147
<pre class="programlisting"><a class="link" href="GFileInfo.html" title="GFileInfo"><span class="returnvalue">GFileInfo</span></a> * g_file_io_stream_query_info (<em class="parameter"><code><a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a> *stream</code></em>,
151
148
<em class="parameter"><code>const <span class="type">char</span> *attributes</code></em>,
152
149
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
153
<em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
150
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
155
152
Queries a file io stream for the given <em class="parameter"><code>attributes</code></em>.
156
153
This function blocks while querying the stream. For the asynchronous
164
161
<a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>), the stream has pending operations (with <em class="parameter"><code>error</code></em> being
165
162
set to <a class="link" href="gio-GIOError.html#G-IO-ERROR-PENDING:CAPS"><code class="literal">G_IO_ERROR_PENDING</code></a>), or if querying info is not supported for
166
163
the stream's interface (with <em class="parameter"><code>error</code></em> being set to <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-SUPPORTED:CAPS"><code class="literal">G_IO_ERROR_NOT_SUPPORTED</code></a>). I
167
all cases of failure, <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will be returned.
164
all cases of failure, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will be returned.
170
If <em class="parameter"><code>cancellable</code></em> is not <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
167
If <em class="parameter"><code>cancellable</code></em> is not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
171
168
triggering the cancellable object from another thread. If the operation
172
was cancelled, the error <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> will be set, and <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will
169
was cancelled, the error <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> will be set, and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will
175
<div class="variablelist"><table border="0" class="variablelist">
172
<div class="variablelist"><table border="0">
177
173
<col align="left" valign="top">
182
176
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
190
184
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
191
<td>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
185
<td>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
195
189
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
196
<td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td>
190
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td>
199
193
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
200
<td>a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> for the <em class="parameter"><code>stream</code></em>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
194
<td>a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> for the <em class="parameter"><code>stream</code></em>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
212
206
<em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
213
207
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
214
208
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
215
<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
209
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
217
211
Asynchronously queries the <em class="parameter"><code>stream</code></em> for a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a>. When completed,
218
212
<em class="parameter"><code>callback</code></em> will be called with a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> which can be used to
222
216
For the synchronous version of this function, see
223
217
<a class="link" href="GFileIOStream.html#g-file-io-stream-query-info" title="g_file_io_stream_query_info ()"><code class="function">g_file_io_stream_query_info()</code></a>.
225
<div class="variablelist"><table border="0" class="variablelist">
219
<div class="variablelist"><table border="0">
227
220
<col align="left" valign="top">
232
223
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
245
236
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
246
<td>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
237
<td>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
265
256
<a name="g-file-io-stream-query-info-finish"></a><h3>g_file_io_stream_query_info_finish ()</h3>
266
257
<pre class="programlisting"><a class="link" href="GFileInfo.html" title="GFileInfo"><span class="returnvalue">GFileInfo</span></a> * g_file_io_stream_query_info_finish (<em class="parameter"><code><a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a> *stream</code></em>,
267
258
<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
268
<em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
259
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
270
261
Finalizes the asynchronous query started
271
262
by <a class="link" href="GFileIOStream.html#g-file-io-stream-query-info-async" title="g_file_io_stream_query_info_async ()"><code class="function">g_file_io_stream_query_info_async()</code></a>.
273
<div class="variablelist"><table border="0" class="variablelist">
264
<div class="variablelist"><table border="0">
275
265
<col align="left" valign="top">
280
268
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
288
276
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
289
<td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td>
277
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td>
292
280
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>