| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 5 |
<title>Reading and Writing from local files and directories: GSF Reference Manual</title> |
| 6 |
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> |
| 7 |
<link rel="home" href="index.html" title="GSF Reference Manual"> |
| 8 |
<link rel="up" href="sources.html" title="Stream Sources"> |
| 9 |
<link rel="prev" href="gsf-Outfile-writing-structed-files.html" title="Outfile writing structed files"> |
| 10 |
<link rel="next" href="gsf-memory.html" title="memory"> |
| 11 |
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)"> |
| 12 |
<link rel="stylesheet" href="style.css" type="text/css"> |
| 13 |
</head> |
| 14 |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| 15 |
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> |
| 16 |
<td width="100%" align="left" class="shortcuts"> |
| 17 |
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> |
| 18 |
<a href="#gsf-Reading-and-Writing-from-local-files-and-directories.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> |
| 19 |
<a href="#gsf-Reading-and-Writing-from-local-files-and-directories.object-hierarchy" class="shortcut">Object Hierarchy</a></span> |
| 20 |
</td> |
| 21 |
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
| 22 |
<td><a accesskey="u" href="sources.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
| 23 |
<td><a accesskey="p" href="gsf-Outfile-writing-structed-files.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
| 24 |
<td><a accesskey="n" href="gsf-memory.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
| 25 |
</tr></table> |
| 26 |
<div class="refentry"> |
| 27 |
<a name="gsf-Reading-and-Writing-from-local-files-and-directories"></a><div class="titlepage"></div> |
| 28 |
<div class="refnamediv"><table width="100%"><tr> |
| 29 |
<td valign="top"> |
| 30 |
<h2><span class="refentrytitle"><a name="gsf-Reading-and-Writing-from-local-files-and-directories.top_of_page"></a>Reading and Writing from local files and directories</span></h2> |
| 31 |
<p>Reading and Writing from local files and directories</p> |
| 32 |
</td> |
| 33 |
<td class="gallery_image" valign="top" align="right"></td> |
| 34 |
</tr></table></div> |
| 35 |
<div class="refsect1"> |
| 36 |
<a name="gsf-Reading-and-Writing-from-local-files-and-directories.functions"></a><h2>Functions</h2> |
| 37 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 38 |
<colgroup> |
| 39 |
<col width="150px" class="functions_proto_type"> |
| 40 |
<col class="functions_proto_name"> |
| 41 |
</colgroup> |
| 42 |
<tbody> |
| 43 |
<tr> |
| 44 |
<td class="function_type"> |
| 45 |
<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> * |
| 46 |
</td> |
| 47 |
<td class="function_name"> |
| 48 |
<a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#gsf-input-stdio-new" title="gsf_input_stdio_new ()">gsf_input_stdio_new</a> <span class="c_punctuation">()</span> |
| 49 |
</td> |
| 50 |
</tr> |
| 51 |
<tr> |
| 52 |
<td class="function_type"> |
| 53 |
<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> * |
| 54 |
</td> |
| 55 |
<td class="function_name"> |
| 56 |
<a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#gsf-input-stdio-new-FILE" title="gsf_input_stdio_new_FILE ()">gsf_input_stdio_new_FILE</a> <span class="c_punctuation">()</span> |
| 57 |
</td> |
| 58 |
</tr> |
| 59 |
<tr> |
| 60 |
<td class="function_type"> |
| 61 |
<a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="returnvalue">GsfOutput</span></a> * |
| 62 |
</td> |
| 63 |
<td class="function_name"> |
| 64 |
<a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#gsf-output-stdio-new" title="gsf_output_stdio_new ()">gsf_output_stdio_new</a> <span class="c_punctuation">()</span> |
| 65 |
</td> |
| 66 |
</tr> |
| 67 |
<tr> |
| 68 |
<td class="function_type"> |
| 69 |
<a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="returnvalue">GsfOutput</span></a> * |
| 70 |
</td> |
| 71 |
<td class="function_name"> |
| 72 |
<a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#gsf-output-stdio-new-full" title="gsf_output_stdio_new_full ()">gsf_output_stdio_new_full</a> <span class="c_punctuation">()</span> |
| 73 |
</td> |
| 74 |
</tr> |
| 75 |
<tr> |
| 76 |
<td class="function_type"> |
| 77 |
<a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="returnvalue">GsfOutput</span></a> * |
| 78 |
</td> |
| 79 |
<td class="function_name"> |
| 80 |
<a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#gsf-output-stdio-new-valist" title="gsf_output_stdio_new_valist ()">gsf_output_stdio_new_valist</a> <span class="c_punctuation">()</span> |
| 81 |
</td> |
| 82 |
</tr> |
| 83 |
<tr> |
| 84 |
<td class="function_type"> |
| 85 |
<a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="returnvalue">GsfOutput</span></a> * |
| 86 |
</td> |
| 87 |
<td class="function_name"> |
| 88 |
<a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#gsf-output-stdio-new-FILE" title="gsf_output_stdio_new_FILE ()">gsf_output_stdio_new_FILE</a> <span class="c_punctuation">()</span> |
| 89 |
</td> |
| 90 |
</tr> |
| 91 |
<tr> |
| 92 |
<td class="function_type"> |
| 93 |
<a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile"><span class="returnvalue">GsfOutfile</span></a> * |
| 94 |
</td> |
| 95 |
<td class="function_name"> |
| 96 |
<a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#gsf-outfile-stdio-new" title="gsf_outfile_stdio_new ()">gsf_outfile_stdio_new</a> <span class="c_punctuation">()</span> |
| 97 |
</td> |
| 98 |
</tr> |
| 99 |
<tr> |
| 100 |
<td class="function_type"> |
| 101 |
<a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile"><span class="returnvalue">GsfOutfile</span></a> * |
| 102 |
</td> |
| 103 |
<td class="function_name"> |
| 104 |
<a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#gsf-outfile-stdio-new-full" title="gsf_outfile_stdio_new_full ()">gsf_outfile_stdio_new_full</a> <span class="c_punctuation">()</span> |
| 105 |
</td> |
| 106 |
</tr> |
| 107 |
<tr> |
| 108 |
<td class="function_type"> |
| 109 |
<a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile"><span class="returnvalue">GsfOutfile</span></a> * |
| 110 |
</td> |
| 111 |
<td class="function_name"> |
| 112 |
<a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#gsf-outfile-stdio-new-valist" title="gsf_outfile_stdio_new_valist ()">gsf_outfile_stdio_new_valist</a> <span class="c_punctuation">()</span> |
| 113 |
</td> |
| 114 |
</tr> |
| 115 |
<tr> |
| 116 |
<td class="function_type"> |
| 117 |
<a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="returnvalue">GsfInfile</span></a> * |
| 118 |
</td> |
| 119 |
<td class="function_name"> |
| 120 |
<a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#gsf-infile-stdio-new" title="gsf_infile_stdio_new ()">gsf_infile_stdio_new</a> <span class="c_punctuation">()</span> |
| 121 |
</td> |
| 122 |
</tr> |
| 123 |
</tbody> |
| 124 |
</table></div> |
| 125 |
</div> |
| 126 |
<a name="GsfInputStdio"></a><a name="GsfOutputStdio"></a><a name="GsfOutfileStdio"></a><a name="GsfInfileStdio"></a><div class="refsect1"> |
| 127 |
<a name="gsf-Reading-and-Writing-from-local-files-and-directories.other"></a><h2>Types and Values</h2> |
| 128 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 129 |
<colgroup> |
| 130 |
<col width="150px" class="other_proto_type"> |
| 131 |
<col class="other_proto_name"> |
| 132 |
</colgroup> |
| 133 |
<tbody> |
| 134 |
<tr> |
| 135 |
<td class="datatype_keyword"> </td> |
| 136 |
<td class="function_name"><a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#GsfInputStdio-struct" title="GsfInputStdio">GsfInputStdio</a></td> |
| 137 |
</tr> |
| 138 |
<tr> |
| 139 |
<td class="datatype_keyword"> </td> |
| 140 |
<td class="function_name"><a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#GsfOutputStdio-struct" title="GsfOutputStdio">GsfOutputStdio</a></td> |
| 141 |
</tr> |
| 142 |
<tr> |
| 143 |
<td class="datatype_keyword"> </td> |
| 144 |
<td class="function_name"><a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#GsfOutfileStdio-struct" title="GsfOutfileStdio">GsfOutfileStdio</a></td> |
| 145 |
</tr> |
| 146 |
<tr> |
| 147 |
<td class="datatype_keyword"> </td> |
| 148 |
<td class="function_name"><a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#GsfInfileStdio-struct" title="GsfInfileStdio">GsfInfileStdio</a></td> |
| 149 |
</tr> |
| 150 |
</tbody> |
| 151 |
</table></div> |
| 152 |
</div> |
| 153 |
<div class="refsect1"> |
| 154 |
<a name="gsf-Reading-and-Writing-from-local-files-and-directories.object-hierarchy"></a><h2>Object Hierarchy</h2> |
| 155 |
<pre class="screen"> GObject |
| 156 |
<span class="lineart">├──</span> <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> |
| 157 |
<span class="lineart">│</span> <span class="lineart">├──</span> <a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile">GsfInfile</a> |
| 158 |
<span class="lineart">│</span> <span class="lineart">│</span> <span class="lineart">╰──</span> GsfInfileStdio |
| 159 |
<span class="lineart">│</span> <span class="lineart">╰──</span> GsfInputStdio |
| 160 |
<span class="lineart">╰──</span> <a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a> |
| 161 |
<span class="lineart">├──</span> <a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile">GsfOutfile</a> |
| 162 |
<span class="lineart">│</span> <span class="lineart">╰──</span> GsfOutfileStdio |
| 163 |
<span class="lineart">╰──</span> GsfOutputStdio |
| 164 |
</pre> |
| 165 |
</div> |
| 166 |
<div class="refsect1"> |
| 167 |
<a name="gsf-Reading-and-Writing-from-local-files-and-directories.description"></a><h2>Description</h2> |
| 168 |
</div> |
| 169 |
<div class="refsect1"> |
| 170 |
<a name="gsf-Reading-and-Writing-from-local-files-and-directories.functions_details"></a><h2>Functions</h2> |
| 171 |
<div class="refsect2"> |
| 172 |
<a name="gsf-input-stdio-new"></a><h3>gsf_input_stdio_new ()</h3> |
| 173 |
<pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> * |
| 174 |
gsf_input_stdio_new (<em class="parameter"><code><span class="type">char</span> const *filename</code></em>, |
| 175 |
<em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre> |
| 176 |
<div class="refsect3"> |
| 177 |
<a name="gsf-input-stdio-new.parameters"></a><h4>Parameters</h4> |
| 178 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 179 |
<colgroup> |
| 180 |
<col width="150px" class="parameters_name"> |
| 181 |
<col class="parameters_description"> |
| 182 |
<col width="200px" class="parameters_annotations"> |
| 183 |
</colgroup> |
| 184 |
<tbody> |
| 185 |
<tr> |
| 186 |
<td class="parameter_name"><p>filename</p></td> |
| 187 |
<td class="parameter_description"><p>in utf8.</p></td> |
| 188 |
<td class="parameter_annotations"> </td> |
| 189 |
</tr> |
| 190 |
<tr> |
| 191 |
<td class="parameter_name"><p>err</p></td> |
| 192 |
<td class="parameter_description"><p>place to store a <span class="type">GError</span> if anything goes wrong. </p></td> |
| 193 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> |
| 194 |
</tr> |
| 195 |
</tbody> |
| 196 |
</table></div> |
| 197 |
</div> |
| 198 |
<div class="refsect3"> |
| 199 |
<a name="gsf-input-stdio-new.returns"></a><h4>Returns</h4> |
| 200 |
<p> a new file or <code class="literal">NULL</code>.</p> |
| 201 |
</div> |
| 202 |
</div> |
| 203 |
<hr> |
| 204 |
<div class="refsect2"> |
| 205 |
<a name="gsf-input-stdio-new-FILE"></a><h3>gsf_input_stdio_new_FILE ()</h3> |
| 206 |
<pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> * |
| 207 |
gsf_input_stdio_new_FILE (<em class="parameter"><code><span class="type">char</span> const *filename</code></em>, |
| 208 |
<em class="parameter"><code><span class="type">FILE</span> *file</code></em>, |
| 209 |
<em class="parameter"><code><span class="type">gboolean</span> keep_open</code></em>);</pre> |
| 210 |
<p>Assumes ownership of <em class="parameter"><code>file</code></em> |
| 211 |
when succeeding. If <em class="parameter"><code>keep_open</code></em> |
| 212 |
is true, |
| 213 |
ownership reverts to caller when the <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> is closed.</p> |
| 214 |
<div class="refsect3"> |
| 215 |
<a name="gsf-input-stdio-new-FILE.parameters"></a><h4>Parameters</h4> |
| 216 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 217 |
<colgroup> |
| 218 |
<col width="150px" class="parameters_name"> |
| 219 |
<col class="parameters_description"> |
| 220 |
<col width="200px" class="parameters_annotations"> |
| 221 |
</colgroup> |
| 222 |
<tbody> |
| 223 |
<tr> |
| 224 |
<td class="parameter_name"><p>filename</p></td> |
| 225 |
<td class="parameter_description"><p>The filename corresponding to <em class="parameter"><code>file</code></em> |
| 226 |
.</p></td> |
| 227 |
<td class="parameter_annotations"> </td> |
| 228 |
</tr> |
| 229 |
<tr> |
| 230 |
<td class="parameter_name"><p>file</p></td> |
| 231 |
<td class="parameter_description"><p>an existing stdio <span class="type">FILE</span> *. </p></td> |
| 232 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> |
| 233 |
</tr> |
| 234 |
<tr> |
| 235 |
<td class="parameter_name"><p>keep_open</p></td> |
| 236 |
<td class="parameter_description"><p>Should <em class="parameter"><code>file</code></em> |
| 237 |
be closed when the wrapper is closed</p></td> |
| 238 |
<td class="parameter_annotations"> </td> |
| 239 |
</tr> |
| 240 |
</tbody> |
| 241 |
</table></div> |
| 242 |
</div> |
| 243 |
<div class="refsect3"> |
| 244 |
<a name="gsf-input-stdio-new-FILE.returns"></a><h4>Returns</h4> |
| 245 |
<p> a new <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> wrapper for <em class="parameter"><code>file</code></em> |
| 246 |
. Note that if the file is not |
| 247 |
seekable, this function will make a local copy of the entire file.</p> |
| 248 |
</div> |
| 249 |
</div> |
| 250 |
<hr> |
| 251 |
<div class="refsect2"> |
| 252 |
<a name="gsf-output-stdio-new"></a><h3>gsf_output_stdio_new ()</h3> |
| 253 |
<pre class="programlisting"><a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="returnvalue">GsfOutput</span></a> * |
| 254 |
gsf_output_stdio_new (<em class="parameter"><code><span class="type">char</span> const *filename</code></em>, |
| 255 |
<em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre> |
| 256 |
<div class="refsect3"> |
| 257 |
<a name="gsf-output-stdio-new.parameters"></a><h4>Parameters</h4> |
| 258 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 259 |
<colgroup> |
| 260 |
<col width="150px" class="parameters_name"> |
| 261 |
<col class="parameters_description"> |
| 262 |
<col width="200px" class="parameters_annotations"> |
| 263 |
</colgroup> |
| 264 |
<tbody> |
| 265 |
<tr> |
| 266 |
<td class="parameter_name"><p>filename</p></td> |
| 267 |
<td class="parameter_description"><p>name of file to create or replace.</p></td> |
| 268 |
<td class="parameter_annotations"> </td> |
| 269 |
</tr> |
| 270 |
<tr> |
| 271 |
<td class="parameter_name"><p>err</p></td> |
| 272 |
<td class="parameter_description"><p>place to store a <span class="type">GError</span> if anything goes wrong. </p></td> |
| 273 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> |
| 274 |
</tr> |
| 275 |
</tbody> |
| 276 |
</table></div> |
| 277 |
</div> |
| 278 |
<div class="refsect3"> |
| 279 |
<a name="gsf-output-stdio-new.returns"></a><h4>Returns</h4> |
| 280 |
<p> a new file or <code class="literal">NULL</code>.</p> |
| 281 |
</div> |
| 282 |
</div> |
| 283 |
<hr> |
| 284 |
<div class="refsect2"> |
| 285 |
<a name="gsf-output-stdio-new-full"></a><h3>gsf_output_stdio_new_full ()</h3> |
| 286 |
<pre class="programlisting"><a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="returnvalue">GsfOutput</span></a> * |
| 287 |
gsf_output_stdio_new_full (<em class="parameter"><code><span class="type">char</span> const *filename</code></em>, |
| 288 |
<em class="parameter"><code><span class="type">GError</span> **err</code></em>, |
| 289 |
<em class="parameter"><code><span class="type">char</span> const *first_property_name</code></em>, |
| 290 |
<em class="parameter"><code>...</code></em>);</pre> |
| 291 |
<div class="refsect3"> |
| 292 |
<a name="gsf-output-stdio-new-full.parameters"></a><h4>Parameters</h4> |
| 293 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 294 |
<colgroup> |
| 295 |
<col width="150px" class="parameters_name"> |
| 296 |
<col class="parameters_description"> |
| 297 |
<col width="200px" class="parameters_annotations"> |
| 298 |
</colgroup> |
| 299 |
<tbody> |
| 300 |
<tr> |
| 301 |
<td class="parameter_name"><p>filename</p></td> |
| 302 |
<td class="parameter_description"><p>name of file to create or replace.</p></td> |
| 303 |
<td class="parameter_annotations"> </td> |
| 304 |
</tr> |
| 305 |
<tr> |
| 306 |
<td class="parameter_name"><p>err</p></td> |
| 307 |
<td class="parameter_description"><p>place to store a <span class="type">GError</span> if anything goes wrong. </p></td> |
| 308 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> |
| 309 |
</tr> |
| 310 |
<tr> |
| 311 |
<td class="parameter_name"><p>first_property_name</p></td> |
| 312 |
<td class="parameter_description"><p><code class="literal">NULL</code> terminated list of properties</p></td> |
| 313 |
<td class="parameter_annotations"> </td> |
| 314 |
</tr> |
| 315 |
</tbody> |
| 316 |
</table></div> |
| 317 |
</div> |
| 318 |
<div class="refsect3"> |
| 319 |
<a name="gsf-output-stdio-new-full.returns"></a><h4>Returns</h4> |
| 320 |
<p> a new file or <code class="literal">NULL</code>.</p> |
| 321 |
</div> |
| 322 |
</div> |
| 323 |
<hr> |
| 324 |
<div class="refsect2"> |
| 325 |
<a name="gsf-output-stdio-new-valist"></a><h3>gsf_output_stdio_new_valist ()</h3> |
| 326 |
<pre class="programlisting"><a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="returnvalue">GsfOutput</span></a> * |
| 327 |
gsf_output_stdio_new_valist (<em class="parameter"><code><span class="type">char</span> const *filename</code></em>, |
| 328 |
<em class="parameter"><code><span class="type">GError</span> **err</code></em>, |
| 329 |
<em class="parameter"><code><span class="type">char</span> const *first_property_name</code></em>, |
| 330 |
<em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre> |
| 331 |
</div> |
| 332 |
<hr> |
| 333 |
<div class="refsect2"> |
| 334 |
<a name="gsf-output-stdio-new-FILE"></a><h3>gsf_output_stdio_new_FILE ()</h3> |
| 335 |
<pre class="programlisting"><a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="returnvalue">GsfOutput</span></a> * |
| 336 |
gsf_output_stdio_new_FILE (<em class="parameter"><code><span class="type">char</span> const *filename</code></em>, |
| 337 |
<em class="parameter"><code><span class="type">FILE</span> *file</code></em>, |
| 338 |
<em class="parameter"><code><span class="type">gboolean</span> keep_open</code></em>);</pre> |
| 339 |
<p>Assumes ownership of <em class="parameter"><code>file</code></em> |
| 340 |
. If <em class="parameter"><code>keep_open</code></em> |
| 341 |
is true, ownership reverts |
| 342 |
to caller when the GsfOutput is closed.</p> |
| 343 |
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p> |
| 344 |
<div class="refsect3"> |
| 345 |
<a name="gsf-output-stdio-new-FILE.parameters"></a><h4>Parameters</h4> |
| 346 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 347 |
<colgroup> |
| 348 |
<col width="150px" class="parameters_name"> |
| 349 |
<col class="parameters_description"> |
| 350 |
<col width="200px" class="parameters_annotations"> |
| 351 |
</colgroup> |
| 352 |
<tbody> |
| 353 |
<tr> |
| 354 |
<td class="parameter_name"><p>filename</p></td> |
| 355 |
<td class="parameter_description"><p>The filename corresponding to <em class="parameter"><code>file</code></em> |
| 356 |
.</p></td> |
| 357 |
<td class="parameter_annotations"> </td> |
| 358 |
</tr> |
| 359 |
<tr> |
| 360 |
<td class="parameter_name"><p>file</p></td> |
| 361 |
<td class="parameter_description"><p>an existing stdio <span class="type">FILE</span> *. </p></td> |
| 362 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> |
| 363 |
</tr> |
| 364 |
<tr> |
| 365 |
<td class="parameter_name"><p>keep_open</p></td> |
| 366 |
<td class="parameter_description"><p>Should <em class="parameter"><code>file</code></em> |
| 367 |
be closed when the wrapper is closed</p></td> |
| 368 |
<td class="parameter_annotations"> </td> |
| 369 |
</tr> |
| 370 |
</tbody> |
| 371 |
</table></div> |
| 372 |
</div> |
| 373 |
<div class="refsect3"> |
| 374 |
<a name="gsf-output-stdio-new-FILE.returns"></a><h4>Returns</h4> |
| 375 |
<p> a new GsfOutput wrapper for <em class="parameter"><code>file</code></em> |
| 376 |
. Warning: the result will be |
| 377 |
seekable only if <em class="parameter"><code>file</code></em> |
| 378 |
is seekable. If it is seekable, the resulting |
| 379 |
GsfOutput object will seek relative to <em class="parameter"><code>file</code></em> |
| 380 |
's beginning, not its |
| 381 |
current location at the time the GsfOutput object is created.</p> |
| 382 |
</div> |
| 383 |
</div> |
| 384 |
<hr> |
| 385 |
<div class="refsect2"> |
| 386 |
<a name="gsf-outfile-stdio-new"></a><h3>gsf_outfile_stdio_new ()</h3> |
| 387 |
<pre class="programlisting"><a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile"><span class="returnvalue">GsfOutfile</span></a> * |
| 388 |
gsf_outfile_stdio_new (<em class="parameter"><code><span class="type">char</span> const *root</code></em>, |
| 389 |
<em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre> |
| 390 |
<div class="refsect3"> |
| 391 |
<a name="gsf-outfile-stdio-new.parameters"></a><h4>Parameters</h4> |
| 392 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 393 |
<colgroup> |
| 394 |
<col width="150px" class="parameters_name"> |
| 395 |
<col class="parameters_description"> |
| 396 |
<col width="200px" class="parameters_annotations"> |
| 397 |
</colgroup> |
| 398 |
<tbody> |
| 399 |
<tr> |
| 400 |
<td class="parameter_name"><p>root</p></td> |
| 401 |
<td class="parameter_description"><p>root directory in utf8.</p></td> |
| 402 |
<td class="parameter_annotations"> </td> |
| 403 |
</tr> |
| 404 |
<tr> |
| 405 |
<td class="parameter_name"><p>err</p></td> |
| 406 |
<td class="parameter_description"><p>place to store a <span class="type">GError</span> if anything goes wrong. </p></td> |
| 407 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> |
| 408 |
</tr> |
| 409 |
</tbody> |
| 410 |
</table></div> |
| 411 |
</div> |
| 412 |
<div class="refsect3"> |
| 413 |
<a name="gsf-outfile-stdio-new.returns"></a><h4>Returns</h4> |
| 414 |
<p> a new outfile or <code class="literal">NULL</code>.</p> |
| 415 |
</div> |
| 416 |
</div> |
| 417 |
<hr> |
| 418 |
<div class="refsect2"> |
| 419 |
<a name="gsf-outfile-stdio-new-full"></a><h3>gsf_outfile_stdio_new_full ()</h3> |
| 420 |
<pre class="programlisting"><a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile"><span class="returnvalue">GsfOutfile</span></a> * |
| 421 |
gsf_outfile_stdio_new_full (<em class="parameter"><code><span class="type">char</span> const *root</code></em>, |
| 422 |
<em class="parameter"><code><span class="type">GError</span> **err</code></em>, |
| 423 |
<em class="parameter"><code><span class="type">char</span> const *first_property_name</code></em>, |
| 424 |
<em class="parameter"><code>...</code></em>);</pre> |
| 425 |
<div class="refsect3"> |
| 426 |
<a name="gsf-outfile-stdio-new-full.parameters"></a><h4>Parameters</h4> |
| 427 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 428 |
<colgroup> |
| 429 |
<col width="150px" class="parameters_name"> |
| 430 |
<col class="parameters_description"> |
| 431 |
<col width="200px" class="parameters_annotations"> |
| 432 |
</colgroup> |
| 433 |
<tbody> |
| 434 |
<tr> |
| 435 |
<td class="parameter_name"><p>root</p></td> |
| 436 |
<td class="parameter_description"><p>root directory in utf8.</p></td> |
| 437 |
<td class="parameter_annotations"> </td> |
| 438 |
</tr> |
| 439 |
<tr> |
| 440 |
<td class="parameter_name"><p>err</p></td> |
| 441 |
<td class="parameter_description"><p>place to store a <span class="type">GError</span> if anything goes wrong. </p></td> |
| 442 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> |
| 443 |
</tr> |
| 444 |
<tr> |
| 445 |
<td class="parameter_name"><p>first_property_name</p></td> |
| 446 |
<td class="parameter_description"><p>name of first property to set</p></td> |
| 447 |
<td class="parameter_annotations"> </td> |
| 448 |
</tr> |
| 449 |
<tr> |
| 450 |
<td class="parameter_name"><p>...</p></td> |
| 451 |
<td class="parameter_description"><p>value of first property, followed by more properties, |
| 452 |
<code class="literal">NULL</code>-terminated</p></td> |
| 453 |
<td class="parameter_annotations"> </td> |
| 454 |
</tr> |
| 455 |
</tbody> |
| 456 |
</table></div> |
| 457 |
</div> |
| 458 |
<div class="refsect3"> |
| 459 |
<a name="gsf-outfile-stdio-new-full.returns"></a><h4>Returns</h4> |
| 460 |
<p>a new outfile or <code class="literal">NULL</code>. </p> |
| 461 |
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> |
| 462 |
</div> |
| 463 |
</div> |
| 464 |
<hr> |
| 465 |
<div class="refsect2"> |
| 466 |
<a name="gsf-outfile-stdio-new-valist"></a><h3>gsf_outfile_stdio_new_valist ()</h3> |
| 467 |
<pre class="programlisting"><a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile"><span class="returnvalue">GsfOutfile</span></a> * |
| 468 |
gsf_outfile_stdio_new_valist (<em class="parameter"><code><span class="type">char</span> const *root</code></em>, |
| 469 |
<em class="parameter"><code><span class="type">GError</span> **err</code></em>, |
| 470 |
<em class="parameter"><code><span class="type">char</span> const *first_property_name</code></em>, |
| 471 |
<em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre> |
| 472 |
<div class="refsect3"> |
| 473 |
<a name="gsf-outfile-stdio-new-valist.parameters"></a><h4>Parameters</h4> |
| 474 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 475 |
<colgroup> |
| 476 |
<col width="150px" class="parameters_name"> |
| 477 |
<col class="parameters_description"> |
| 478 |
<col width="200px" class="parameters_annotations"> |
| 479 |
</colgroup> |
| 480 |
<tbody> |
| 481 |
<tr> |
| 482 |
<td class="parameter_name"><p>root</p></td> |
| 483 |
<td class="parameter_description"><p>root directory in utf8.</p></td> |
| 484 |
<td class="parameter_annotations"> </td> |
| 485 |
</tr> |
| 486 |
<tr> |
| 487 |
<td class="parameter_name"><p>err</p></td> |
| 488 |
<td class="parameter_description"><p>place to store a <span class="type">GError</span> if anything goes wrong. </p></td> |
| 489 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> |
| 490 |
</tr> |
| 491 |
<tr> |
| 492 |
<td class="parameter_name"><p>first_property_name</p></td> |
| 493 |
<td class="parameter_description"><p>name of first property to set</p></td> |
| 494 |
<td class="parameter_annotations"> </td> |
| 495 |
</tr> |
| 496 |
<tr> |
| 497 |
<td class="parameter_name"><p>var_args</p></td> |
| 498 |
<td class="parameter_description"><p>a <code class="literal">NULL</code>-terminated <span class="type">va_list</span></p></td> |
| 499 |
<td class="parameter_annotations"> </td> |
| 500 |
</tr> |
| 501 |
</tbody> |
| 502 |
</table></div> |
| 503 |
</div> |
| 504 |
<div class="refsect3"> |
| 505 |
<a name="gsf-outfile-stdio-new-valist.returns"></a><h4>Returns</h4> |
| 506 |
<p>a new outfile or <code class="literal">NULL</code>. </p> |
| 507 |
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> |
| 508 |
</div> |
| 509 |
</div> |
| 510 |
<hr> |
| 511 |
<div class="refsect2"> |
| 512 |
<a name="gsf-infile-stdio-new"></a><h3>gsf_infile_stdio_new ()</h3> |
| 513 |
<pre class="programlisting"><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="returnvalue">GsfInfile</span></a> * |
| 514 |
gsf_infile_stdio_new (<em class="parameter"><code><span class="type">char</span> const *root</code></em>, |
| 515 |
<em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre> |
| 516 |
<div class="refsect3"> |
| 517 |
<a name="gsf-infile-stdio-new.parameters"></a><h4>Parameters</h4> |
| 518 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 519 |
<colgroup> |
| 520 |
<col width="150px" class="parameters_name"> |
| 521 |
<col class="parameters_description"> |
| 522 |
<col width="200px" class="parameters_annotations"> |
| 523 |
</colgroup> |
| 524 |
<tbody> |
| 525 |
<tr> |
| 526 |
<td class="parameter_name"><p>root</p></td> |
| 527 |
<td class="parameter_description"><p>in locale dependent encoding</p></td> |
| 528 |
<td class="parameter_annotations"> </td> |
| 529 |
</tr> |
| 530 |
<tr> |
| 531 |
<td class="parameter_name"><p>err</p></td> |
| 532 |
<td class="parameter_description"><p>optionally <code class="literal">NULL</code>.</p></td> |
| 533 |
<td class="parameter_annotations"> </td> |
| 534 |
</tr> |
| 535 |
</tbody> |
| 536 |
</table></div> |
| 537 |
</div> |
| 538 |
<div class="refsect3"> |
| 539 |
<a name="gsf-infile-stdio-new.returns"></a><h4>Returns</h4> |
| 540 |
<p> a new file or <code class="literal">NULL</code>.</p> |
| 541 |
</div> |
| 542 |
</div> |
| 543 |
</div> |
| 544 |
<div class="refsect1"> |
| 545 |
<a name="gsf-Reading-and-Writing-from-local-files-and-directories.other_details"></a><h2>Types and Values</h2> |
| 546 |
<div class="refsect2"> |
| 547 |
<a name="GsfInputStdio-struct"></a><h3>GsfInputStdio</h3> |
| 548 |
<pre class="programlisting">typedef struct _GsfInputStdio GsfInputStdio;</pre> |
| 549 |
</div> |
| 550 |
<hr> |
| 551 |
<div class="refsect2"> |
| 552 |
<a name="GsfOutputStdio-struct"></a><h3>GsfOutputStdio</h3> |
| 553 |
<pre class="programlisting">typedef struct _GsfOutputStdio GsfOutputStdio;</pre> |
| 554 |
</div> |
| 555 |
<hr> |
| 556 |
<div class="refsect2"> |
| 557 |
<a name="GsfOutfileStdio-struct"></a><h3>GsfOutfileStdio</h3> |
| 558 |
<pre class="programlisting">typedef struct _GsfOutfileStdio GsfOutfileStdio;</pre> |
| 559 |
</div> |
| 560 |
<hr> |
| 561 |
<div class="refsect2"> |
| 562 |
<a name="GsfInfileStdio-struct"></a><h3>GsfInfileStdio</h3> |
| 563 |
<pre class="programlisting">typedef struct _GsfInfileStdio GsfInfileStdio;</pre> |
| 564 |
</div> |
| 565 |
</div> |
| 566 |
</div> |
| 567 |
<div class="footer"> |
| 568 |
<hr>Generated by GTK-Doc V1.34.0</div> |
| 569 |
</body> |
| 570 |
</html> |