1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GFile: GIO Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
7 <link rel="home" href="index.html" title="GIO Reference Manual">
8 <link rel="up" href="file_ops.html" title="File Operations">
9 <link rel="prev" href="file_ops.html" title="File Operations">
10 <link rel="next" href="gio-GFileAttribute.html" title="GFileAttribute">
11 <meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
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="#GFile.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
19 <a href="#GFile.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_prerequisites"> <span class="dim">|</span>
20 <a href="#GFile.prerequisites" class="shortcut">Prerequisites</a></span>
22 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
23 <td><a accesskey="u" href="file_ops.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
24 <td><a accesskey="p" href="file_ops.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
25 <td><a accesskey="n" href="gio-GFileAttribute.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
27 <div class="refentry">
28 <a name="GFile"></a><div class="titlepage"></div>
29 <div class="refnamediv"><table width="100%"><tr>
31 <h2><span class="refentrytitle"><a name="GFile.top_of_page"></a>GFile</span></h2>
32 <p>GFile — File and Directory Handling</p>
34 <td class="gallery_image" valign="top" align="right"></td>
36 <div class="refsect1">
37 <a name="GFile.functions"></a><h2>Functions</h2>
38 <div class="informaltable"><table class="informaltable" width="100%" border="0">
40 <col width="150px" class="functions_return">
41 <col class="functions_name">
45 <td class="function_type">
46 <span class="returnvalue">void</span>
48 <td class="function_name">
49 <span class="c_punctuation">(</span><a class="link" href="GFile.html#GFileProgressCallback" title="GFileProgressCallback ()">*GFileProgressCallback</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
53 <td class="function_type">
54 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
56 <td class="function_name">
57 <span class="c_punctuation">(</span><a class="link" href="GFile.html#GFileReadMoreCallback" title="GFileReadMoreCallback ()">*GFileReadMoreCallback</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
61 <td class="function_type">
62 <span class="returnvalue">void</span>
64 <td class="function_name">
65 <span class="c_punctuation">(</span><a class="link" href="GFile.html#GFileMeasureProgressCallback" title="GFileMeasureProgressCallback ()">*GFileMeasureProgressCallback</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
69 <td class="function_type">
70 <a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
72 <td class="function_name">
73 <a class="link" href="GFile.html#g-file-new-for-path" title="g_file_new_for_path ()">g_file_new_for_path</a> <span class="c_punctuation">()</span>
77 <td class="function_type">
78 <a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
80 <td class="function_name">
81 <a class="link" href="GFile.html#g-file-new-for-uri" title="g_file_new_for_uri ()">g_file_new_for_uri</a> <span class="c_punctuation">()</span>
85 <td class="function_type">
86 <a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
88 <td class="function_name">
89 <a class="link" href="GFile.html#g-file-new-for-commandline-arg" title="g_file_new_for_commandline_arg ()">g_file_new_for_commandline_arg</a> <span class="c_punctuation">()</span>
93 <td class="function_type">
94 <a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
96 <td class="function_name">
97 <a class="link" href="GFile.html#g-file-new-for-commandline-arg-and-cwd" title="g_file_new_for_commandline_arg_and_cwd ()">g_file_new_for_commandline_arg_and_cwd</a> <span class="c_punctuation">()</span>
101 <td class="function_type">
102 <a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
104 <td class="function_name">
105 <a class="link" href="GFile.html#g-file-new-tmp" title="g_file_new_tmp ()">g_file_new_tmp</a> <span class="c_punctuation">()</span>
109 <td class="function_type">
110 <a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
112 <td class="function_name">
113 <a class="link" href="GFile.html#g-file-parse-name" title="g_file_parse_name ()">g_file_parse_name</a> <span class="c_punctuation">()</span>
117 <td class="function_type">
118 <a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
120 <td class="function_name">
121 <a class="link" href="GFile.html#g-file-dup" title="g_file_dup ()">g_file_dup</a> <span class="c_punctuation">()</span>
125 <td class="function_type">
126 <a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
128 <td class="function_name">
129 <a class="link" href="GFile.html#g-file-hash" title="g_file_hash ()">g_file_hash</a> <span class="c_punctuation">()</span>
133 <td class="function_type">
134 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
136 <td class="function_name">
137 <a class="link" href="GFile.html#g-file-equal" title="g_file_equal ()">g_file_equal</a> <span class="c_punctuation">()</span>
141 <td class="function_type">
142 <span class="returnvalue">char</span> *
144 <td class="function_name">
145 <a class="link" href="GFile.html#g-file-get-basename" title="g_file_get_basename ()">g_file_get_basename</a> <span class="c_punctuation">()</span>
149 <td class="function_type">
150 <span class="returnvalue">char</span> *
152 <td class="function_name">
153 <a class="link" href="GFile.html#g-file-get-path" title="g_file_get_path ()">g_file_get_path</a> <span class="c_punctuation">()</span>
157 <td class="function_type">
158 <span class="returnvalue">char</span> *
160 <td class="function_name">
161 <a class="link" href="GFile.html#g-file-get-uri" title="g_file_get_uri ()">g_file_get_uri</a> <span class="c_punctuation">()</span>
165 <td class="function_type">
166 <span class="returnvalue">char</span> *
168 <td class="function_name">
169 <a class="link" href="GFile.html#g-file-get-parse-name" title="g_file_get_parse_name ()">g_file_get_parse_name</a> <span class="c_punctuation">()</span>
173 <td class="function_type">
174 <a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
176 <td class="function_name">
177 <a class="link" href="GFile.html#g-file-get-parent" title="g_file_get_parent ()">g_file_get_parent</a> <span class="c_punctuation">()</span>
181 <td class="function_type">
182 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
184 <td class="function_name">
185 <a class="link" href="GFile.html#g-file-has-parent" title="g_file_has_parent ()">g_file_has_parent</a> <span class="c_punctuation">()</span>
189 <td class="function_type">
190 <a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
192 <td class="function_name">
193 <a class="link" href="GFile.html#g-file-get-child" title="g_file_get_child ()">g_file_get_child</a> <span class="c_punctuation">()</span>
197 <td class="function_type">
198 <a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
200 <td class="function_name">
201 <a class="link" href="GFile.html#g-file-get-child-for-display-name" title="g_file_get_child_for_display_name ()">g_file_get_child_for_display_name</a> <span class="c_punctuation">()</span>
205 <td class="function_type">
206 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
208 <td class="function_name">
209 <a class="link" href="GFile.html#g-file-has-prefix" title="g_file_has_prefix ()">g_file_has_prefix</a> <span class="c_punctuation">()</span>
213 <td class="function_type">
214 <span class="returnvalue">char</span> *
216 <td class="function_name">
217 <a class="link" href="GFile.html#g-file-get-relative-path" title="g_file_get_relative_path ()">g_file_get_relative_path</a> <span class="c_punctuation">()</span>
221 <td class="function_type">
222 <a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
224 <td class="function_name">
225 <a class="link" href="GFile.html#g-file-resolve-relative-path" title="g_file_resolve_relative_path ()">g_file_resolve_relative_path</a> <span class="c_punctuation">()</span>
229 <td class="function_type">
230 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
232 <td class="function_name">
233 <a class="link" href="GFile.html#g-file-is-native" title="g_file_is_native ()">g_file_is_native</a> <span class="c_punctuation">()</span>
237 <td class="function_type">
238 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
240 <td class="function_name">
241 <a class="link" href="GFile.html#g-file-has-uri-scheme" title="g_file_has_uri_scheme ()">g_file_has_uri_scheme</a> <span class="c_punctuation">()</span>
245 <td class="function_type">
246 <span class="returnvalue">char</span> *
248 <td class="function_name">
249 <a class="link" href="GFile.html#g-file-get-uri-scheme" title="g_file_get_uri_scheme ()">g_file_get_uri_scheme</a> <span class="c_punctuation">()</span>
253 <td class="function_type">
254 <a class="link" href="GFileInputStream.html" title="GFileInputStream"><span class="returnvalue">GFileInputStream</span></a> *
256 <td class="function_name">
257 <a class="link" href="GFile.html#g-file-read" title="g_file_read ()">g_file_read</a> <span class="c_punctuation">()</span>
261 <td class="function_type">
262 <span class="returnvalue">void</span>
264 <td class="function_name">
265 <a class="link" href="GFile.html#g-file-read-async" title="g_file_read_async ()">g_file_read_async</a> <span class="c_punctuation">()</span>
269 <td class="function_type">
270 <a class="link" href="GFileInputStream.html" title="GFileInputStream"><span class="returnvalue">GFileInputStream</span></a> *
272 <td class="function_name">
273 <a class="link" href="GFile.html#g-file-read-finish" title="g_file_read_finish ()">g_file_read_finish</a> <span class="c_punctuation">()</span>
277 <td class="function_type">
278 <a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="returnvalue">GFileOutputStream</span></a> *
280 <td class="function_name">
281 <a class="link" href="GFile.html#g-file-append-to" title="g_file_append_to ()">g_file_append_to</a> <span class="c_punctuation">()</span>
285 <td class="function_type">
286 <a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="returnvalue">GFileOutputStream</span></a> *
288 <td class="function_name">
289 <a class="link" href="GFile.html#g-file-create" title="g_file_create ()">g_file_create</a> <span class="c_punctuation">()</span>
293 <td class="function_type">
294 <a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="returnvalue">GFileOutputStream</span></a> *
296 <td class="function_name">
297 <a class="link" href="GFile.html#g-file-replace" title="g_file_replace ()">g_file_replace</a> <span class="c_punctuation">()</span>
301 <td class="function_type">
302 <span class="returnvalue">void</span>
304 <td class="function_name">
305 <a class="link" href="GFile.html#g-file-append-to-async" title="g_file_append_to_async ()">g_file_append_to_async</a> <span class="c_punctuation">()</span>
309 <td class="function_type">
310 <a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="returnvalue">GFileOutputStream</span></a> *
312 <td class="function_name">
313 <a class="link" href="GFile.html#g-file-append-to-finish" title="g_file_append_to_finish ()">g_file_append_to_finish</a> <span class="c_punctuation">()</span>
317 <td class="function_type">
318 <span class="returnvalue">void</span>
320 <td class="function_name">
321 <a class="link" href="GFile.html#g-file-create-async" title="g_file_create_async ()">g_file_create_async</a> <span class="c_punctuation">()</span>
325 <td class="function_type">
326 <a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="returnvalue">GFileOutputStream</span></a> *
328 <td class="function_name">
329 <a class="link" href="GFile.html#g-file-create-finish" title="g_file_create_finish ()">g_file_create_finish</a> <span class="c_punctuation">()</span>
333 <td class="function_type">
334 <span class="returnvalue">void</span>
336 <td class="function_name">
337 <a class="link" href="GFile.html#g-file-replace-async" title="g_file_replace_async ()">g_file_replace_async</a> <span class="c_punctuation">()</span>
341 <td class="function_type">
342 <a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="returnvalue">GFileOutputStream</span></a> *
344 <td class="function_name">
345 <a class="link" href="GFile.html#g-file-replace-finish" title="g_file_replace_finish ()">g_file_replace_finish</a> <span class="c_punctuation">()</span>
349 <td class="function_type">
350 <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="returnvalue">GFileInfo</span></a> *
352 <td class="function_name">
353 <a class="link" href="GFile.html#g-file-query-info" title="g_file_query_info ()">g_file_query_info</a> <span class="c_punctuation">()</span>
357 <td class="function_type">
358 <span class="returnvalue">void</span>
360 <td class="function_name">
361 <a class="link" href="GFile.html#g-file-query-info-async" title="g_file_query_info_async ()">g_file_query_info_async</a> <span class="c_punctuation">()</span>
365 <td class="function_type">
366 <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="returnvalue">GFileInfo</span></a> *
368 <td class="function_name">
369 <a class="link" href="GFile.html#g-file-query-info-finish" title="g_file_query_info_finish ()">g_file_query_info_finish</a> <span class="c_punctuation">()</span>
373 <td class="function_type">
374 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
376 <td class="function_name">
377 <a class="link" href="GFile.html#g-file-query-exists" title="g_file_query_exists ()">g_file_query_exists</a> <span class="c_punctuation">()</span>
381 <td class="function_type">
382 <a class="link" href="GFileInfo.html#GFileType" title="enum GFileType"><span class="returnvalue">GFileType</span></a>
384 <td class="function_name">
385 <a class="link" href="GFile.html#g-file-query-file-type" title="g_file_query_file_type ()">g_file_query_file_type</a> <span class="c_punctuation">()</span>
389 <td class="function_type">
390 <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="returnvalue">GFileInfo</span></a> *
392 <td class="function_name">
393 <a class="link" href="GFile.html#g-file-query-filesystem-info" title="g_file_query_filesystem_info ()">g_file_query_filesystem_info</a> <span class="c_punctuation">()</span>
397 <td class="function_type">
398 <span class="returnvalue">void</span>
400 <td class="function_name">
401 <a class="link" href="GFile.html#g-file-query-filesystem-info-async" title="g_file_query_filesystem_info_async ()">g_file_query_filesystem_info_async</a> <span class="c_punctuation">()</span>
405 <td class="function_type">
406 <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="returnvalue">GFileInfo</span></a> *
408 <td class="function_name">
409 <a class="link" href="GFile.html#g-file-query-filesystem-info-finish" title="g_file_query_filesystem_info_finish ()">g_file_query_filesystem_info_finish</a> <span class="c_punctuation">()</span>
413 <td class="function_type">
414 <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="returnvalue">GAppInfo</span></a> *
416 <td class="function_name">
417 <a class="link" href="GFile.html#g-file-query-default-handler" title="g_file_query_default_handler ()">g_file_query_default_handler</a> <span class="c_punctuation">()</span>
421 <td class="function_type">
422 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
424 <td class="function_name">
425 <a class="link" href="GFile.html#g-file-measure-disk-usage" title="g_file_measure_disk_usage ()">g_file_measure_disk_usage</a> <span class="c_punctuation">()</span>
429 <td class="function_type">
430 <span class="returnvalue">void</span>
432 <td class="function_name">
433 <a class="link" href="GFile.html#g-file-measure-disk-usage-async" title="g_file_measure_disk_usage_async ()">g_file_measure_disk_usage_async</a> <span class="c_punctuation">()</span>
437 <td class="function_type">
438 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
440 <td class="function_name">
441 <a class="link" href="GFile.html#g-file-measure-disk-usage-finish" title="g_file_measure_disk_usage_finish ()">g_file_measure_disk_usage_finish</a> <span class="c_punctuation">()</span>
445 <td class="function_type">
446 <a class="link" href="GMount.html" title="GMount"><span class="returnvalue">GMount</span></a> *
448 <td class="function_name">
449 <a class="link" href="GFile.html#g-file-find-enclosing-mount" title="g_file_find_enclosing_mount ()">g_file_find_enclosing_mount</a> <span class="c_punctuation">()</span>
453 <td class="function_type">
454 <span class="returnvalue">void</span>
456 <td class="function_name">
457 <a class="link" href="GFile.html#g-file-find-enclosing-mount-async" title="g_file_find_enclosing_mount_async ()">g_file_find_enclosing_mount_async</a> <span class="c_punctuation">()</span>
461 <td class="function_type">
462 <a class="link" href="GMount.html" title="GMount"><span class="returnvalue">GMount</span></a> *
464 <td class="function_name">
465 <a class="link" href="GFile.html#g-file-find-enclosing-mount-finish" title="g_file_find_enclosing_mount_finish ()">g_file_find_enclosing_mount_finish</a> <span class="c_punctuation">()</span>
469 <td class="function_type">
470 <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="returnvalue">GFileEnumerator</span></a> *
472 <td class="function_name">
473 <a class="link" href="GFile.html#g-file-enumerate-children" title="g_file_enumerate_children ()">g_file_enumerate_children</a> <span class="c_punctuation">()</span>
477 <td class="function_type">
478 <span class="returnvalue">void</span>
480 <td class="function_name">
481 <a class="link" href="GFile.html#g-file-enumerate-children-async" title="g_file_enumerate_children_async ()">g_file_enumerate_children_async</a> <span class="c_punctuation">()</span>
485 <td class="function_type">
486 <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="returnvalue">GFileEnumerator</span></a> *
488 <td class="function_name">
489 <a class="link" href="GFile.html#g-file-enumerate-children-finish" title="g_file_enumerate_children_finish ()">g_file_enumerate_children_finish</a> <span class="c_punctuation">()</span>
493 <td class="function_type">
494 <a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
496 <td class="function_name">
497 <a class="link" href="GFile.html#g-file-set-display-name" title="g_file_set_display_name ()">g_file_set_display_name</a> <span class="c_punctuation">()</span>
501 <td class="function_type">
502 <span class="returnvalue">void</span>
504 <td class="function_name">
505 <a class="link" href="GFile.html#g-file-set-display-name-async" title="g_file_set_display_name_async ()">g_file_set_display_name_async</a> <span class="c_punctuation">()</span>
509 <td class="function_type">
510 <a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
512 <td class="function_name">
513 <a class="link" href="GFile.html#g-file-set-display-name-finish" title="g_file_set_display_name_finish ()">g_file_set_display_name_finish</a> <span class="c_punctuation">()</span>
517 <td class="function_type">
518 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
520 <td class="function_name">
521 <a class="link" href="GFile.html#g-file-delete" title="g_file_delete ()">g_file_delete</a> <span class="c_punctuation">()</span>
525 <td class="function_type">
526 <span class="returnvalue">void</span>
528 <td class="function_name">
529 <a class="link" href="GFile.html#g-file-delete-async" title="g_file_delete_async ()">g_file_delete_async</a> <span class="c_punctuation">()</span>
533 <td class="function_type">
534 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
536 <td class="function_name">
537 <a class="link" href="GFile.html#g-file-delete-finish" title="g_file_delete_finish ()">g_file_delete_finish</a> <span class="c_punctuation">()</span>
541 <td class="function_type">
542 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
544 <td class="function_name">
545 <a class="link" href="GFile.html#g-file-trash" title="g_file_trash ()">g_file_trash</a> <span class="c_punctuation">()</span>
549 <td class="function_type">
550 <span class="returnvalue">void</span>
552 <td class="function_name">
553 <a class="link" href="GFile.html#g-file-trash-async" title="g_file_trash_async ()">g_file_trash_async</a> <span class="c_punctuation">()</span>
557 <td class="function_type">
558 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
560 <td class="function_name">
561 <a class="link" href="GFile.html#g-file-trash-finish" title="g_file_trash_finish ()">g_file_trash_finish</a> <span class="c_punctuation">()</span>
565 <td class="function_type">
566 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
568 <td class="function_name">
569 <a class="link" href="GFile.html#g-file-copy" title="g_file_copy ()">g_file_copy</a> <span class="c_punctuation">()</span>
573 <td class="function_type">
574 <span class="returnvalue">void</span>
576 <td class="function_name">
577 <a class="link" href="GFile.html#g-file-copy-async" title="g_file_copy_async ()">g_file_copy_async</a> <span class="c_punctuation">()</span>
581 <td class="function_type">
582 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
584 <td class="function_name">
585 <a class="link" href="GFile.html#g-file-copy-finish" title="g_file_copy_finish ()">g_file_copy_finish</a> <span class="c_punctuation">()</span>
589 <td class="function_type">
590 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
592 <td class="function_name">
593 <a class="link" href="GFile.html#g-file-move" title="g_file_move ()">g_file_move</a> <span class="c_punctuation">()</span>
597 <td class="function_type">
598 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
600 <td class="function_name">
601 <a class="link" href="GFile.html#g-file-make-directory" title="g_file_make_directory ()">g_file_make_directory</a> <span class="c_punctuation">()</span>
605 <td class="function_type">
606 <span class="returnvalue">void</span>
608 <td class="function_name">
609 <a class="link" href="GFile.html#g-file-make-directory-async" title="g_file_make_directory_async ()">g_file_make_directory_async</a> <span class="c_punctuation">()</span>
613 <td class="function_type">
614 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
616 <td class="function_name">
617 <a class="link" href="GFile.html#g-file-make-directory-finish" title="g_file_make_directory_finish ()">g_file_make_directory_finish</a> <span class="c_punctuation">()</span>
621 <td class="function_type">
622 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
624 <td class="function_name">
625 <a class="link" href="GFile.html#g-file-make-directory-with-parents" title="g_file_make_directory_with_parents ()">g_file_make_directory_with_parents</a> <span class="c_punctuation">()</span>
629 <td class="function_type">
630 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
632 <td class="function_name">
633 <a class="link" href="GFile.html#g-file-make-symbolic-link" title="g_file_make_symbolic_link ()">g_file_make_symbolic_link</a> <span class="c_punctuation">()</span>
637 <td class="function_type">
638 <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList"><span class="returnvalue">GFileAttributeInfoList</span></a> *
640 <td class="function_name">
641 <a class="link" href="GFile.html#g-file-query-settable-attributes" title="g_file_query_settable_attributes ()">g_file_query_settable_attributes</a> <span class="c_punctuation">()</span>
645 <td class="function_type">
646 <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList"><span class="returnvalue">GFileAttributeInfoList</span></a> *
648 <td class="function_name">
649 <a class="link" href="GFile.html#g-file-query-writable-namespaces" title="g_file_query_writable_namespaces ()">g_file_query_writable_namespaces</a> <span class="c_punctuation">()</span>
653 <td class="function_type">
654 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
656 <td class="function_name">
657 <a class="link" href="GFile.html#g-file-set-attribute" title="g_file_set_attribute ()">g_file_set_attribute</a> <span class="c_punctuation">()</span>
661 <td class="function_type">
662 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
664 <td class="function_name">
665 <a class="link" href="GFile.html#g-file-set-attributes-from-info" title="g_file_set_attributes_from_info ()">g_file_set_attributes_from_info</a> <span class="c_punctuation">()</span>
669 <td class="function_type">
670 <span class="returnvalue">void</span>
672 <td class="function_name">
673 <a class="link" href="GFile.html#g-file-set-attributes-async" title="g_file_set_attributes_async ()">g_file_set_attributes_async</a> <span class="c_punctuation">()</span>
677 <td class="function_type">
678 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
680 <td class="function_name">
681 <a class="link" href="GFile.html#g-file-set-attributes-finish" title="g_file_set_attributes_finish ()">g_file_set_attributes_finish</a> <span class="c_punctuation">()</span>
685 <td class="function_type">
686 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
688 <td class="function_name">
689 <a class="link" href="GFile.html#g-file-set-attribute-string" title="g_file_set_attribute_string ()">g_file_set_attribute_string</a> <span class="c_punctuation">()</span>
693 <td class="function_type">
694 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
696 <td class="function_name">
697 <a class="link" href="GFile.html#g-file-set-attribute-byte-string" title="g_file_set_attribute_byte_string ()">g_file_set_attribute_byte_string</a> <span class="c_punctuation">()</span>
701 <td class="function_type">
702 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
704 <td class="function_name">
705 <a class="link" href="GFile.html#g-file-set-attribute-uint32" title="g_file_set_attribute_uint32 ()">g_file_set_attribute_uint32</a> <span class="c_punctuation">()</span>
709 <td class="function_type">
710 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
712 <td class="function_name">
713 <a class="link" href="GFile.html#g-file-set-attribute-int32" title="g_file_set_attribute_int32 ()">g_file_set_attribute_int32</a> <span class="c_punctuation">()</span>
717 <td class="function_type">
718 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
720 <td class="function_name">
721 <a class="link" href="GFile.html#g-file-set-attribute-uint64" title="g_file_set_attribute_uint64 ()">g_file_set_attribute_uint64</a> <span class="c_punctuation">()</span>
725 <td class="function_type">
726 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
728 <td class="function_name">
729 <a class="link" href="GFile.html#g-file-set-attribute-int64" title="g_file_set_attribute_int64 ()">g_file_set_attribute_int64</a> <span class="c_punctuation">()</span>
733 <td class="function_type">
734 <span class="returnvalue">void</span>
736 <td class="function_name">
737 <a class="link" href="GFile.html#g-file-mount-mountable" title="g_file_mount_mountable ()">g_file_mount_mountable</a> <span class="c_punctuation">()</span>
741 <td class="function_type">
742 <a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
744 <td class="function_name">
745 <a class="link" href="GFile.html#g-file-mount-mountable-finish" title="g_file_mount_mountable_finish ()">g_file_mount_mountable_finish</a> <span class="c_punctuation">()</span>
749 <td class="function_type">
750 <span class="returnvalue">void</span>
752 <td class="function_name">
753 <a class="link" href="GFile.html#g-file-unmount-mountable" title="g_file_unmount_mountable ()">g_file_unmount_mountable</a> <span class="c_punctuation">()</span>
757 <td class="function_type">
758 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
760 <td class="function_name">
761 <a class="link" href="GFile.html#g-file-unmount-mountable-finish" title="g_file_unmount_mountable_finish ()">g_file_unmount_mountable_finish</a> <span class="c_punctuation">()</span>
765 <td class="function_type">
766 <span class="returnvalue">void</span>
768 <td class="function_name">
769 <a class="link" href="GFile.html#g-file-unmount-mountable-with-operation" title="g_file_unmount_mountable_with_operation ()">g_file_unmount_mountable_with_operation</a> <span class="c_punctuation">()</span>
773 <td class="function_type">
774 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
776 <td class="function_name">
777 <a class="link" href="GFile.html#g-file-unmount-mountable-with-operation-finish" title="g_file_unmount_mountable_with_operation_finish ()">g_file_unmount_mountable_with_operation_finish</a> <span class="c_punctuation">()</span>
781 <td class="function_type">
782 <span class="returnvalue">void</span>
784 <td class="function_name">
785 <a class="link" href="GFile.html#g-file-eject-mountable" title="g_file_eject_mountable ()">g_file_eject_mountable</a> <span class="c_punctuation">()</span>
789 <td class="function_type">
790 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
792 <td class="function_name">
793 <a class="link" href="GFile.html#g-file-eject-mountable-finish" title="g_file_eject_mountable_finish ()">g_file_eject_mountable_finish</a> <span class="c_punctuation">()</span>
797 <td class="function_type">
798 <span class="returnvalue">void</span>
800 <td class="function_name">
801 <a class="link" href="GFile.html#g-file-eject-mountable-with-operation" title="g_file_eject_mountable_with_operation ()">g_file_eject_mountable_with_operation</a> <span class="c_punctuation">()</span>
805 <td class="function_type">
806 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
808 <td class="function_name">
809 <a class="link" href="GFile.html#g-file-eject-mountable-with-operation-finish" title="g_file_eject_mountable_with_operation_finish ()">g_file_eject_mountable_with_operation_finish</a> <span class="c_punctuation">()</span>
813 <td class="function_type">
814 <span class="returnvalue">void</span>
816 <td class="function_name">
817 <a class="link" href="GFile.html#g-file-start-mountable" title="g_file_start_mountable ()">g_file_start_mountable</a> <span class="c_punctuation">()</span>
821 <td class="function_type">
822 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
824 <td class="function_name">
825 <a class="link" href="GFile.html#g-file-start-mountable-finish" title="g_file_start_mountable_finish ()">g_file_start_mountable_finish</a> <span class="c_punctuation">()</span>
829 <td class="function_type">
830 <span class="returnvalue">void</span>
832 <td class="function_name">
833 <a class="link" href="GFile.html#g-file-stop-mountable" title="g_file_stop_mountable ()">g_file_stop_mountable</a> <span class="c_punctuation">()</span>
837 <td class="function_type">
838 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
840 <td class="function_name">
841 <a class="link" href="GFile.html#g-file-stop-mountable-finish" title="g_file_stop_mountable_finish ()">g_file_stop_mountable_finish</a> <span class="c_punctuation">()</span>
845 <td class="function_type">
846 <span class="returnvalue">void</span>
848 <td class="function_name">
849 <a class="link" href="GFile.html#g-file-poll-mountable" title="g_file_poll_mountable ()">g_file_poll_mountable</a> <span class="c_punctuation">()</span>
853 <td class="function_type">
854 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
856 <td class="function_name">
857 <a class="link" href="GFile.html#g-file-poll-mountable-finish" title="g_file_poll_mountable_finish ()">g_file_poll_mountable_finish</a> <span class="c_punctuation">()</span>
861 <td class="function_type">
862 <span class="returnvalue">void</span>
864 <td class="function_name">
865 <a class="link" href="GFile.html#g-file-mount-enclosing-volume" title="g_file_mount_enclosing_volume ()">g_file_mount_enclosing_volume</a> <span class="c_punctuation">()</span>
869 <td class="function_type">
870 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
872 <td class="function_name">
873 <a class="link" href="GFile.html#g-file-mount-enclosing-volume-finish" title="g_file_mount_enclosing_volume_finish ()">g_file_mount_enclosing_volume_finish</a> <span class="c_punctuation">()</span>
877 <td class="function_type">
878 <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="returnvalue">GFileMonitor</span></a> *
880 <td class="function_name">
881 <a class="link" href="GFile.html#g-file-monitor-directory" title="g_file_monitor_directory ()">g_file_monitor_directory</a> <span class="c_punctuation">()</span>
885 <td class="function_type">
886 <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="returnvalue">GFileMonitor</span></a> *
888 <td class="function_name">
889 <a class="link" href="GFile.html#g-file-monitor-file" title="g_file_monitor_file ()">g_file_monitor_file</a> <span class="c_punctuation">()</span>
893 <td class="function_type">
894 <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="returnvalue">GFileMonitor</span></a> *
896 <td class="function_name">
897 <a class="link" href="GFile.html#g-file-monitor" title="g_file_monitor ()">g_file_monitor</a> <span class="c_punctuation">()</span>
901 <td class="function_type">
902 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
904 <td class="function_name">
905 <a class="link" href="GFile.html#g-file-load-contents" title="g_file_load_contents ()">g_file_load_contents</a> <span class="c_punctuation">()</span>
909 <td class="function_type">
910 <span class="returnvalue">void</span>
912 <td class="function_name">
913 <a class="link" href="GFile.html#g-file-load-contents-async" title="g_file_load_contents_async ()">g_file_load_contents_async</a> <span class="c_punctuation">()</span>
917 <td class="function_type">
918 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
920 <td class="function_name">
921 <a class="link" href="GFile.html#g-file-load-contents-finish" title="g_file_load_contents_finish ()">g_file_load_contents_finish</a> <span class="c_punctuation">()</span>
925 <td class="function_type">
926 <span class="returnvalue">void</span>
928 <td class="function_name">
929 <a class="link" href="GFile.html#g-file-load-partial-contents-async" title="g_file_load_partial_contents_async ()">g_file_load_partial_contents_async</a> <span class="c_punctuation">()</span>
933 <td class="function_type">
934 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
936 <td class="function_name">
937 <a class="link" href="GFile.html#g-file-load-partial-contents-finish" title="g_file_load_partial_contents_finish ()">g_file_load_partial_contents_finish</a> <span class="c_punctuation">()</span>
941 <td class="function_type">
942 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
944 <td class="function_name">
945 <a class="link" href="GFile.html#g-file-replace-contents" title="g_file_replace_contents ()">g_file_replace_contents</a> <span class="c_punctuation">()</span>
949 <td class="function_type">
950 <span class="returnvalue">void</span>
952 <td class="function_name">
953 <a class="link" href="GFile.html#g-file-replace-contents-async" title="g_file_replace_contents_async ()">g_file_replace_contents_async</a> <span class="c_punctuation">()</span>
957 <td class="function_type">
958 <span class="returnvalue">void</span>
960 <td class="function_name">
961 <a class="link" href="GFile.html#g-file-replace-contents-bytes-async" title="g_file_replace_contents_bytes_async ()">g_file_replace_contents_bytes_async</a> <span class="c_punctuation">()</span>
965 <td class="function_type">
966 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
968 <td class="function_name">
969 <a class="link" href="GFile.html#g-file-replace-contents-finish" title="g_file_replace_contents_finish ()">g_file_replace_contents_finish</a> <span class="c_punctuation">()</span>
973 <td class="function_type">
974 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
976 <td class="function_name">
977 <a class="link" href="GFile.html#g-file-copy-attributes" title="g_file_copy_attributes ()">g_file_copy_attributes</a> <span class="c_punctuation">()</span>
981 <td class="function_type">
982 <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="returnvalue">GFileIOStream</span></a> *
984 <td class="function_name">
985 <a class="link" href="GFile.html#g-file-create-readwrite" title="g_file_create_readwrite ()">g_file_create_readwrite</a> <span class="c_punctuation">()</span>
989 <td class="function_type">
990 <span class="returnvalue">void</span>
992 <td class="function_name">
993 <a class="link" href="GFile.html#g-file-create-readwrite-async" title="g_file_create_readwrite_async ()">g_file_create_readwrite_async</a> <span class="c_punctuation">()</span>
997 <td class="function_type">
998 <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="returnvalue">GFileIOStream</span></a> *
1000 <td class="function_name">
1001 <a class="link" href="GFile.html#g-file-create-readwrite-finish" title="g_file_create_readwrite_finish ()">g_file_create_readwrite_finish</a> <span class="c_punctuation">()</span>
1005 <td class="function_type">
1006 <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="returnvalue">GFileIOStream</span></a> *
1008 <td class="function_name">
1009 <a class="link" href="GFile.html#g-file-open-readwrite" title="g_file_open_readwrite ()">g_file_open_readwrite</a> <span class="c_punctuation">()</span>
1013 <td class="function_type">
1014 <span class="returnvalue">void</span>
1016 <td class="function_name">
1017 <a class="link" href="GFile.html#g-file-open-readwrite-async" title="g_file_open_readwrite_async ()">g_file_open_readwrite_async</a> <span class="c_punctuation">()</span>
1021 <td class="function_type">
1022 <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="returnvalue">GFileIOStream</span></a> *
1024 <td class="function_name">
1025 <a class="link" href="GFile.html#g-file-open-readwrite-finish" title="g_file_open_readwrite_finish ()">g_file_open_readwrite_finish</a> <span class="c_punctuation">()</span>
1029 <td class="function_type">
1030 <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="returnvalue">GFileIOStream</span></a> *
1032 <td class="function_name">
1033 <a class="link" href="GFile.html#g-file-replace-readwrite" title="g_file_replace_readwrite ()">g_file_replace_readwrite</a> <span class="c_punctuation">()</span>
1037 <td class="function_type">
1038 <span class="returnvalue">void</span>
1040 <td class="function_name">
1041 <a class="link" href="GFile.html#g-file-replace-readwrite-async" title="g_file_replace_readwrite_async ()">g_file_replace_readwrite_async</a> <span class="c_punctuation">()</span>
1045 <td class="function_type">
1046 <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="returnvalue">GFileIOStream</span></a> *
1048 <td class="function_name">
1049 <a class="link" href="GFile.html#g-file-replace-readwrite-finish" title="g_file_replace_readwrite_finish ()">g_file_replace_readwrite_finish</a> <span class="c_punctuation">()</span>
1053 <td class="function_type">
1054 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1056 <td class="function_name">
1057 <a class="link" href="GFile.html#g-file-supports-thread-contexts" title="g_file_supports_thread_contexts ()">g_file_supports_thread_contexts</a> <span class="c_punctuation">()</span>
1063 <div class="refsect1">
1064 <a name="GFile.other"></a><h2>Types and Values</h2>
1065 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1067 <col width="150px" class="name">
1068 <col class="description">
1072 <td class="datatype_keyword"> </td>
1073 <td class="function_name"><a class="link" href="GFile.html#GFile-struct" title="GFile">GFile</a></td>
1076 <td class="datatype_keyword">struct</td>
1077 <td class="function_name"><a class="link" href="GFile.html#GFileIface" title="struct GFileIface">GFileIface</a></td>
1080 <td class="datatype_keyword">enum</td>
1081 <td class="function_name"><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags">GFileQueryInfoFlags</a></td>
1084 <td class="datatype_keyword">enum</td>
1085 <td class="function_name"><a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags">GFileCreateFlags</a></td>
1088 <td class="datatype_keyword">enum</td>
1089 <td class="function_name"><a class="link" href="GFile.html#GFileCopyFlags" title="enum GFileCopyFlags">GFileCopyFlags</a></td>
1092 <td class="datatype_keyword">enum</td>
1093 <td class="function_name"><a class="link" href="GFile.html#GFileMonitorFlags" title="enum GFileMonitorFlags">GFileMonitorFlags</a></td>
1096 <td class="datatype_keyword">enum</td>
1097 <td class="function_name"><a class="link" href="GFile.html#GFileMeasureFlags" title="enum GFileMeasureFlags">GFileMeasureFlags</a></td>
1100 <td class="datatype_keyword">enum</td>
1101 <td class="function_name"><a class="link" href="GFile.html#GFilesystemPreviewType" title="enum GFilesystemPreviewType">GFilesystemPreviewType</a></td>
1106 <div class="refsect1">
1107 <a name="GFile.object-hierarchy"></a><h2>Object Hierarchy</h2>
1108 <pre class="screen"> <a href="/home/mclasen/gnome/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
1109 <span class="lineart">╰──</span> GFile
1112 <div class="refsect1">
1113 <a name="GFile.prerequisites"></a><h2>Prerequisites</h2>
1116 <a href="../gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>.</p>
1118 <div class="refsect1">
1119 <a name="GFile.includes"></a><h2>Includes</h2>
1120 <pre class="synopsis">#include <gio/gio.h>
1123 <div class="refsect1">
1124 <a name="GFile.description"></a><h2>Description</h2>
1125 <p><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> is a high level abstraction for manipulating files on a
1126 virtual file system. <a href="GFile.html#GFile-struct"><span class="type">GFiles</span></a> are lightweight, immutable objects
1127 that do no I/O upon creation. It is necessary to understand that
1128 <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> objects do not represent files, merely an identifier for a
1129 file. All file content I/O is implemented as streaming operations
1130 (see <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a> and <a class="link" href="GOutputStream.html" title="GOutputStream"><span class="type">GOutputStream</span></a>).</p>
1131 <p>To construct a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>, you can use:</p>
1132 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
1133 <li class="listitem"><p>g_file_new_for_path() if you have a path.</p></li>
1134 <li class="listitem"><p>g_file_new_for_uri() if you have a URI.</p></li>
1135 <li class="listitem"><p>g_file_new_for_commandline_arg() for a command line argument.</p></li>
1136 <li class="listitem"><p>g_file_new_tmp() to create a temporary file from a template.</p></li>
1137 <li class="listitem"><p>g_file_parse_name() from a UTF-8 string gotten from <a class="link" href="GFile.html#g-file-get-parse-name" title="g_file_get_parse_name ()"><code class="function">g_file_get_parse_name()</code></a>.</p></li>
1139 <p>One way to think of a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> is as an abstraction of a pathname. For
1140 normal files the system pathname is what is stored internally, but as
1141 <a href="GFile.html#GFile-struct"><span class="type">GFiles</span></a> are extensible it could also be something else that corresponds
1142 to a pathname in a userspace implementation of a filesystem.</p>
1143 <p><a href="GFile.html#GFile-struct"><span class="type">GFiles</span></a> make up hierarchies of directories and files that correspond to
1144 the files on a filesystem. You can move through the file system with
1145 <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> using <a class="link" href="GFile.html#g-file-get-parent" title="g_file_get_parent ()"><code class="function">g_file_get_parent()</code></a> to get an identifier for the parent
1146 directory, <a class="link" href="GFile.html#g-file-get-child" title="g_file_get_child ()"><code class="function">g_file_get_child()</code></a> to get a child within a directory,
1147 <a class="link" href="GFile.html#g-file-resolve-relative-path" title="g_file_resolve_relative_path ()"><code class="function">g_file_resolve_relative_path()</code></a> to resolve a relative path between two
1148 <a href="GFile.html#GFile-struct"><span class="type">GFiles</span></a>. There can be multiple hierarchies, so you may not end up at
1149 the same root if you repeatedly call <a class="link" href="GFile.html#g-file-get-parent" title="g_file_get_parent ()"><code class="function">g_file_get_parent()</code></a> on two different
1151 <p>All <a href="GFile.html#GFile-struct"><span class="type">GFiles</span></a> have a basename (get with <a class="link" href="GFile.html#g-file-get-basename" title="g_file_get_basename ()"><code class="function">g_file_get_basename()</code></a>). These names
1152 are byte strings that are used to identify the file on the filesystem
1153 (relative to its parent directory) and there is no guarantees that they
1154 have any particular charset encoding or even make any sense at all. If
1155 you want to use filenames in a user interface you should use the display
1156 name that you can get by requesting the
1157 <a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-DISPLAY-NAME:CAPS" title="G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</code></a> attribute with <a class="link" href="GFile.html#g-file-query-info" title="g_file_query_info ()"><code class="function">g_file_query_info()</code></a>.
1158 This is guaranteed to be in UTF-8 and can be used in a user interface.
1159 But always store the real basename or the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> to use to actually
1160 access the file, because there is no way to go from a display name to
1161 the actual name.</p>
1162 <p>Using <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> as an identifier has the same weaknesses as using a path
1163 in that there may be multiple aliases for the same file. For instance,
1164 hard or soft links may cause two different <a href="GFile.html#GFile-struct"><span class="type">GFiles</span></a> to refer to the same
1165 file. Other possible causes for aliases are: case insensitive filesystems,
1166 short and long names on FAT/NTFS, or bind mounts in Linux. If you want to
1167 check if two <a href="GFile.html#GFile-struct"><span class="type">GFiles</span></a> point to the same file you can query for the
1168 <a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-ID-FILE:CAPS" title="G_FILE_ATTRIBUTE_ID_FILE"><code class="literal">G_FILE_ATTRIBUTE_ID_FILE</code></a> attribute. Note that <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> does some trivial
1169 canonicalization of pathnames passed in, so that trivial differences in
1170 the path string used at creation (duplicated slashes, slash at end of
1171 path, "." or ".." path segments, etc) does not create different <a href="GFile.html#GFile-struct"><span class="type">GFiles</span></a>.</p>
1172 <p>Many <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> operations have both synchronous and asynchronous versions
1173 to suit your application. Asynchronous versions of synchronous functions
1174 simply have <a class="link" href="async.html" title="Asynchronous I/O"><code class="function">_async()</code></a> appended to their function names. The asynchronous
1175 I/O functions call a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> which is then used to finalize
1176 the operation, producing a GAsyncResult which is then passed to the
1177 function's matching <code class="function">_finish()</code> operation.</p>
1178 <p>It is highly recommended to use asynchronous calls when running within a
1179 shared main loop, such as in the main thread of an application. This avoids
1180 I/O operations blocking other sources on the main loop from being dispatched.
1181 Synchronous I/O operations should be performed from worker threads. See the
1182 introduction to asynchronous programming section for
1184 <p>Some <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> operations almost always take a noticeable amount of time, and
1185 so do not have synchronous analogs. Notable cases include:</p>
1186 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
1187 <li class="listitem"><p>g_file_mount_mountable() to mount a mountable file.</p></li>
1188 <li class="listitem"><p>g_file_unmount_mountable_with_operation() to unmount a mountable file.</p></li>
1189 <li class="listitem"><p>g_file_eject_mountable_with_operation() to eject a mountable file.</p></li>
1191 <div class="refsect3">
1192 <a name="gfile-etag"></a><h4>Entity Tags</h4>
1193 <p>One notable feature of <a href="GFile.html#GFile-struct"><span class="type">GFiles</span></a> are entity tags, or "etags" for
1194 short. Entity tags are somewhat like a more abstract version of the
1195 traditional mtime, and can be used to quickly determine if the file
1196 has been modified from the version on the file system. See the
1198 <a class="ulink" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html" target="_top">specification</a>
1199 for HTTP Etag headers, which are a very similar concept.</p>
1202 <div class="refsect1">
1203 <a name="GFile.functions_details"></a><h2>Functions</h2>
1204 <div class="refsect2">
1205 <a name="GFileProgressCallback"></a><h3>GFileProgressCallback ()</h3>
1206 <pre class="programlisting"><span class="returnvalue">void</span>
1207 <span class="c_punctuation">(</span>*GFileProgressCallback<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="../glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> current_num_bytes</code></em>,
1208 <em class="parameter"><code><a href="../glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> total_num_bytes</code></em>,
1209 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
1210 <p>When doing file operations that may take a while, such as moving
1211 a file or copying a file, a progress callback is used to pass how
1212 far along that operation is to the application.</p>
1213 <div class="refsect3">
1214 <a name="GFileProgressCallback.parameters"></a><h4>Parameters</h4>
1215 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1217 <col width="150px" class="parameters_name">
1218 <col class="parameters_description">
1219 <col width="200px" class="parameters_annotations">
1223 <td class="parameter_name"><p>current_num_bytes</p></td>
1224 <td class="parameter_description"><p>the current number of bytes in the operation.</p></td>
1225 <td class="parameter_annotations"> </td>
1228 <td class="parameter_name"><p>total_num_bytes</p></td>
1229 <td class="parameter_description"><p>the total number of bytes in the operation.</p></td>
1230 <td class="parameter_annotations"> </td>
1233 <td class="parameter_name"><p>user_data</p></td>
1234 <td class="parameter_description"><p>user data passed to the callback.</p></td>
1235 <td class="parameter_annotations"> </td>
1242 <div class="refsect2">
1243 <a name="GFileReadMoreCallback"></a><h3>GFileReadMoreCallback ()</h3>
1244 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1245 <span class="c_punctuation">(</span>*GFileReadMoreCallback<span class="c_punctuation">)</span> (<em class="parameter"><code>const <span class="type">char</span> *file_contents</code></em>,
1246 <em class="parameter"><code><a href="../glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> file_size</code></em>,
1247 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> callback_data</code></em>);</pre>
1248 <p>When loading the partial contents of a file with <a class="link" href="GFile.html#g-file-load-partial-contents-async" title="g_file_load_partial_contents_async ()"><code class="function">g_file_load_partial_contents_async()</code></a>,
1249 it may become necessary to determine if any more data from the file should be loaded.
1250 A <a class="link" href="GFile.html#GFileReadMoreCallback" title="GFileReadMoreCallback ()"><span class="type">GFileReadMoreCallback</span></a> function facilitates this by returning <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if more data
1251 should be read, or <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
1252 <div class="refsect3">
1253 <a name="GFileReadMoreCallback.parameters"></a><h4>Parameters</h4>
1254 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1256 <col width="150px" class="parameters_name">
1257 <col class="parameters_description">
1258 <col width="200px" class="parameters_annotations">
1262 <td class="parameter_name"><p>file_contents</p></td>
1263 <td class="parameter_description"><p>the data as currently read.</p></td>
1264 <td class="parameter_annotations"> </td>
1267 <td class="parameter_name"><p>file_size</p></td>
1268 <td class="parameter_description"><p>the size of the data currently read.</p></td>
1269 <td class="parameter_annotations"> </td>
1272 <td class="parameter_name"><p>callback_data</p></td>
1273 <td class="parameter_description"><p>data passed to the callback.</p></td>
1274 <td class="parameter_annotations"> </td>
1279 <div class="refsect3">
1280 <a name="GFileReadMoreCallback.returns"></a><h4>Returns</h4>
1281 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if more data should be read back. <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
1285 <div class="refsect2">
1286 <a name="GFileMeasureProgressCallback"></a><h3>GFileMeasureProgressCallback ()</h3>
1287 <pre class="programlisting"><span class="returnvalue">void</span>
1288 <span class="c_punctuation">(</span>*GFileMeasureProgressCallback<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> reporting</code></em>,
1289 <em class="parameter"><code><a href="../glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> current_size</code></em>,
1290 <em class="parameter"><code><a href="../glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> num_dirs</code></em>,
1291 <em class="parameter"><code><a href="../glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> num_files</code></em>,
1292 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
1293 <p>This callback type is used by <a class="link" href="GFile.html#g-file-measure-disk-usage" title="g_file_measure_disk_usage ()"><code class="function">g_file_measure_disk_usage()</code></a> to make
1294 periodic progress reports when measuring the amount of disk spaced
1295 used by a directory.</p>
1296 <p>These calls are made on a best-effort basis and not all types of
1297 <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> will support them. At the minimum, however, one call will
1298 always be made immediately.</p>
1299 <p>In the case that there is no support, <em class="parameter"><code>reporting</code></em>
1301 <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> (and the other values undefined) and no further calls will be
1302 made. Otherwise, the <em class="parameter"><code>reporting</code></em>
1303 will be <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> and the other values
1304 all-zeros during the first (immediate) call. In this way, you can
1305 know which type of progress UI to show without a delay.</p>
1306 <p>For <a class="link" href="GFile.html#g-file-measure-disk-usage" title="g_file_measure_disk_usage ()"><code class="function">g_file_measure_disk_usage()</code></a> the callback is made directly. For
1307 <a class="link" href="GFile.html#g-file-measure-disk-usage-async" title="g_file_measure_disk_usage_async ()"><code class="function">g_file_measure_disk_usage_async()</code></a> the callback is made via the
1308 default main context of the calling thread (ie: the same way that the
1309 final async result would be reported).</p>
1310 <p><em class="parameter"><code>current_size</code></em>
1311 is in the same units as requested by the operation (see
1312 <code class="literal">G_FILE_DISK_USAGE_APPARENT_SIZE</code>).</p>
1313 <p>The frequency of the updates is implementation defined, but is
1314 ideally about once every 200ms.</p>
1315 <p>The last progress callback may or may not be equal to the final
1316 result. Always check the async result to get the final value.</p>
1317 <div class="refsect3">
1318 <a name="GFileMeasureProgressCallback.parameters"></a><h4>Parameters</h4>
1319 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1321 <col width="150px" class="parameters_name">
1322 <col class="parameters_description">
1323 <col width="200px" class="parameters_annotations">
1327 <td class="parameter_name"><p>reporting</p></td>
1328 <td class="parameter_description"><p><a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if more reports will come</p></td>
1329 <td class="parameter_annotations"> </td>
1332 <td class="parameter_name"><p>current_size</p></td>
1333 <td class="parameter_description"><p>the current cumulative size measurement</p></td>
1334 <td class="parameter_annotations"> </td>
1337 <td class="parameter_name"><p>num_dirs</p></td>
1338 <td class="parameter_description"><p>the number of directories visited so far</p></td>
1339 <td class="parameter_annotations"> </td>
1342 <td class="parameter_name"><p>num_files</p></td>
1343 <td class="parameter_description"><p>the number of non-directory files encountered</p></td>
1344 <td class="parameter_annotations"> </td>
1347 <td class="parameter_name"><p>user_data</p></td>
1348 <td class="parameter_description"><p>the data passed to the original request for this callback</p></td>
1349 <td class="parameter_annotations"> </td>
1354 <p class="since">Since: <a class="link" href="api-index-2-38.html#api-index-2.38">2.38</a></p>
1357 <div class="refsect2">
1358 <a name="g-file-new-for-path"></a><h3>g_file_new_for_path ()</h3>
1359 <pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
1360 g_file_new_for_path (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>);</pre>
1361 <p>Constructs a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> for a given path. This operation never
1362 fails, but the returned object might not support any I/O
1363 operation if <em class="parameter"><code>path</code></em>
1365 <div class="refsect3">
1366 <a name="g-file-new-for-path.parameters"></a><h4>Parameters</h4>
1367 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1369 <col width="150px" class="parameters_name">
1370 <col class="parameters_description">
1371 <col width="200px" class="parameters_annotations">
1374 <td class="parameter_name"><p>path</p></td>
1375 <td class="parameter_description"><p> a string containing a relative or absolute path.
1376 The string must be encoded in the glib filename encoding. </p></td>
1377 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename]</span></td>
1381 <div class="refsect3">
1382 <a name="g-file-new-for-path.returns"></a><h4>Returns</h4>
1383 <p> a new <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> for the given <em class="parameter"><code>path</code></em>
1385 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
1386 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1390 <div class="refsect2">
1391 <a name="g-file-new-for-uri"></a><h3>g_file_new_for_uri ()</h3>
1392 <pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
1393 g_file_new_for_uri (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);</pre>
1394 <p>Constructs a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> for a given URI. This operation never
1395 fails, but the returned object might not support any I/O
1396 operation if <em class="parameter"><code>uri</code></em>
1397 is malformed or if the uri type is
1399 <div class="refsect3">
1400 <a name="g-file-new-for-uri.parameters"></a><h4>Parameters</h4>
1401 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1403 <col width="150px" class="parameters_name">
1404 <col class="parameters_description">
1405 <col width="200px" class="parameters_annotations">
1408 <td class="parameter_name"><p>uri</p></td>
1409 <td class="parameter_description"><p>a UTF-8 string containing a URI</p></td>
1410 <td class="parameter_annotations"> </td>
1414 <div class="refsect3">
1415 <a name="g-file-new-for-uri.returns"></a><h4>Returns</h4>
1416 <p> a new <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> for the given <em class="parameter"><code>uri</code></em>
1418 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
1419 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1423 <div class="refsect2">
1424 <a name="g-file-new-for-commandline-arg"></a><h3>g_file_new_for_commandline_arg ()</h3>
1425 <pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
1426 g_file_new_for_commandline_arg (<em class="parameter"><code>const <span class="type">char</span> *arg</code></em>);</pre>
1427 <p>Creates a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> with the given argument from the command line.
1428 The value of <em class="parameter"><code>arg</code></em>
1429 can be either a URI, an absolute path or a
1430 relative path resolved relative to the current working directory.
1431 This operation never fails, but the returned object might not
1432 support any I/O operation if <em class="parameter"><code>arg</code></em>
1433 points to a malformed path.</p>
1434 <p>Note that on Windows, this function expects its argument to be in
1435 UTF-8 -- not the system code page. This means that you
1436 should not use this function with string from argv as it is passed
1437 to <code class="function">main()</code>. <a href="../glib-Windows-Compatibility-Functions.html#g-win32-get-command-line"><code class="function">g_win32_get_command_line()</code></a> will return a UTF-8 version of
1438 the commandline. <a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> also uses UTF-8 but
1439 <a class="link" href="GApplicationCommandLine.html#g-application-command-line-create-file-for-arg" title="g_application_command_line_create_file_for_arg ()"><code class="function">g_application_command_line_create_file_for_arg()</code></a> may be more useful
1440 for you there. It is also always possible to use this function with
1441 <a href="../glib-Commandline-option-parser.html#GOptionContext"><span class="type">GOptionContext</span></a> arguments of type <a href="../glib-Commandline-option-parser.html#G-OPTION-ARG-FILENAME:CAPS"><code class="literal">G_OPTION_ARG_FILENAME</code></a>.</p>
1442 <div class="refsect3">
1443 <a name="g-file-new-for-commandline-arg.parameters"></a><h4>Parameters</h4>
1444 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1446 <col width="150px" class="parameters_name">
1447 <col class="parameters_description">
1448 <col width="200px" class="parameters_annotations">
1451 <td class="parameter_name"><p>arg</p></td>
1452 <td class="parameter_description"><p>a command line string</p></td>
1453 <td class="parameter_annotations"> </td>
1457 <div class="refsect3">
1458 <a name="g-file-new-for-commandline-arg.returns"></a><h4>Returns</h4>
1459 <p> a new <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.
1460 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
1461 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1465 <div class="refsect2">
1466 <a name="g-file-new-for-commandline-arg-and-cwd"></a><h3>g_file_new_for_commandline_arg_and_cwd ()</h3>
1467 <pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
1468 g_file_new_for_commandline_arg_and_cwd
1469 (<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *arg</code></em>,
1470 <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *cwd</code></em>);</pre>
1471 <p>Creates a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> with the given argument from the command line.</p>
1472 <p>This function is similar to <a class="link" href="GFile.html#g-file-new-for-commandline-arg" title="g_file_new_for_commandline_arg ()"><code class="function">g_file_new_for_commandline_arg()</code></a> except
1473 that it allows for passing the current working directory as an
1474 argument instead of using the current working directory of the
1476 <p>This is useful if the commandline argument was given in a context
1477 other than the invocation of the current process.</p>
1478 <p>See also <a class="link" href="GApplicationCommandLine.html#g-application-command-line-create-file-for-arg" title="g_application_command_line_create_file_for_arg ()"><code class="function">g_application_command_line_create_file_for_arg()</code></a>.</p>
1479 <div class="refsect3">
1480 <a name="g-file-new-for-commandline-arg-and-cwd.parameters"></a><h4>Parameters</h4>
1481 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1483 <col width="150px" class="parameters_name">
1484 <col class="parameters_description">
1485 <col width="200px" class="parameters_annotations">
1489 <td class="parameter_name"><p>arg</p></td>
1490 <td class="parameter_description"><p>a command line string</p></td>
1491 <td class="parameter_annotations"> </td>
1494 <td class="parameter_name"><p>cwd</p></td>
1495 <td class="parameter_description"><p> the current working directory of the commandline. </p></td>
1496 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename]</span></td>
1501 <div class="refsect3">
1502 <a name="g-file-new-for-commandline-arg-and-cwd.returns"></a><h4>Returns</h4>
1503 <p> a new <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>. </p>
1504 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1506 <p class="since">Since: <a class="link" href="api-index-2-36.html#api-index-2.36">2.36</a></p>
1509 <div class="refsect2">
1510 <a name="g-file-new-tmp"></a><h3>g_file_new_tmp ()</h3>
1511 <pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
1512 g_file_new_tmp (<em class="parameter"><code>const <span class="type">char</span> *tmpl</code></em>,
1513 <em class="parameter"><code><a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a> **iostream</code></em>,
1514 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1515 <p>Opens a file in the preferred directory for temporary files (as
1516 returned by <a href="../glib-Miscellaneous-Utility-Functions.html#g-get-tmp-dir"><code class="function">g_get_tmp_dir()</code></a>) and returns a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> and
1517 <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a> pointing to it.</p>
1518 <p><em class="parameter"><code>tmpl</code></em>
1519 should be a string in the GLib file name encoding
1520 containing a sequence of six 'X' characters, and containing no
1521 directory components. If it is <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, a default template is used.</p>
1522 <p>Unlike the other <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> constructors, this will return <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
1523 a temporary file could not be created.</p>
1524 <div class="refsect3">
1525 <a name="g-file-new-tmp.parameters"></a><h4>Parameters</h4>
1526 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1528 <col width="150px" class="parameters_name">
1529 <col class="parameters_description">
1530 <col width="200px" class="parameters_annotations">
1534 <td class="parameter_name"><p>tmpl</p></td>
1535 <td class="parameter_description"><p> Template for the file
1536 name, as in <a href="../glib-File-Utilities.html#g-file-open-tmp"><code class="function">g_file_open_tmp()</code></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for a default template. </p></td>
1537 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
1540 <td class="parameter_name"><p>iostream</p></td>
1541 <td class="parameter_description"><p> on return, a <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a> for the created file. </p></td>
1542 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
1545 <td class="parameter_name"><p>error</p></td>
1546 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1547 <td class="parameter_annotations"> </td>
1552 <div class="refsect3">
1553 <a name="g-file-new-tmp.returns"></a><h4>Returns</h4>
1554 <p> a new <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.
1555 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
1556 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1558 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
1561 <div class="refsect2">
1562 <a name="g-file-parse-name"></a><h3>g_file_parse_name ()</h3>
1563 <pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
1564 g_file_parse_name (<em class="parameter"><code>const <span class="type">char</span> *parse_name</code></em>);</pre>
1565 <p>Constructs a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> with the given <em class="parameter"><code>parse_name</code></em>
1567 given by <a class="link" href="GFile.html#g-file-get-parse-name" title="g_file_get_parse_name ()"><code class="function">g_file_get_parse_name()</code></a>). This operation never fails,
1568 but the returned object might not support any I/O operation if
1569 the <em class="parameter"><code>parse_name</code></em>
1570 cannot be parsed.</p>
1571 <div class="refsect3">
1572 <a name="g-file-parse-name.parameters"></a><h4>Parameters</h4>
1573 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1575 <col width="150px" class="parameters_name">
1576 <col class="parameters_description">
1577 <col width="200px" class="parameters_annotations">
1580 <td class="parameter_name"><p>parse_name</p></td>
1581 <td class="parameter_description"><p>a file name or path to be parsed</p></td>
1582 <td class="parameter_annotations"> </td>
1586 <div class="refsect3">
1587 <a name="g-file-parse-name.returns"></a><h4>Returns</h4>
1588 <p> a new <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>. </p>
1589 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1593 <div class="refsect2">
1594 <a name="g-file-dup"></a><h3>g_file_dup ()</h3>
1595 <pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
1596 g_file_dup (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>);</pre>
1597 <p>Duplicates a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> handle. This operation does not duplicate
1598 the actual file or directory represented by the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>; see
1599 <a class="link" href="GFile.html#g-file-copy" title="g_file_copy ()"><code class="function">g_file_copy()</code></a> if attempting to copy a file.</p>
1600 <p>This call does no blocking I/O.</p>
1601 <div class="refsect3">
1602 <a name="g-file-dup.parameters"></a><h4>Parameters</h4>
1603 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1605 <col width="150px" class="parameters_name">
1606 <col class="parameters_description">
1607 <col width="200px" class="parameters_annotations">
1610 <td class="parameter_name"><p>file</p></td>
1611 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
1612 <td class="parameter_annotations"> </td>
1616 <div class="refsect3">
1617 <a name="g-file-dup.returns"></a><h4>Returns</h4>
1618 <p> a new <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> that is a duplicate
1619 of the given <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>. </p>
1620 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1624 <div class="refsect2">
1625 <a name="g-file-hash"></a><h3>g_file_hash ()</h3>
1626 <pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
1627 g_file_hash (<em class="parameter"><code><a href="../glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> file</code></em>);</pre>
1628 <p>Creates a hash value for a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p>
1629 <p>This call does no blocking I/O.</p>
1630 <p>Virtual: hash</p>
1631 <div class="refsect3">
1632 <a name="g-file-hash.parameters"></a><h4>Parameters</h4>
1633 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1635 <col width="150px" class="parameters_name">
1636 <col class="parameters_description">
1637 <col width="200px" class="parameters_annotations">
1640 <td class="parameter_name"><p>file</p></td>
1641 <td class="parameter_description"><p> <a href="../glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> to a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>. </p></td>
1642 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GFile]</span></td>
1646 <div class="refsect3">
1647 <a name="g-file-hash.returns"></a><h4>Returns</h4>
1648 <p> 0 if <em class="parameter"><code>file</code></em>
1649 is not a valid <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>, otherwise an
1650 integer that can be used as hash value for the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.
1651 This function is intended for easily hashing a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> to
1652 add to a <a href="../glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> or similar data structure.</p>
1656 <div class="refsect2">
1657 <a name="g-file-equal"></a><h3>g_file_equal ()</h3>
1658 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1659 g_file_equal (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file1</code></em>,
1660 <em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file2</code></em>);</pre>
1661 <p>Checks if the two given <a href="GFile.html#GFile-struct"><span class="type">GFiles</span></a> refer to the same file.</p>
1662 <p>Note that two <a href="GFile.html#GFile-struct"><span class="type">GFiles</span></a> that differ can still refer to the same
1663 file on the filesystem due to various forms of filename
1665 <p>This call does no blocking I/O.</p>
1666 <div class="refsect3">
1667 <a name="g-file-equal.parameters"></a><h4>Parameters</h4>
1668 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1670 <col width="150px" class="parameters_name">
1671 <col class="parameters_description">
1672 <col width="200px" class="parameters_annotations">
1676 <td class="parameter_name"><p>file1</p></td>
1677 <td class="parameter_description"><p>the first <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
1678 <td class="parameter_annotations"> </td>
1681 <td class="parameter_name"><p>file2</p></td>
1682 <td class="parameter_description"><p>the second <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
1683 <td class="parameter_annotations"> </td>
1688 <div class="refsect3">
1689 <a name="g-file-equal.returns"></a><h4>Returns</h4>
1690 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>file1</code></em>
1691 and <em class="parameter"><code>file2</code></em>
1696 <div class="refsect2">
1697 <a name="g-file-get-basename"></a><h3>g_file_get_basename ()</h3>
1698 <pre class="programlisting"><span class="returnvalue">char</span> *
1699 g_file_get_basename (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>);</pre>
1700 <p>Gets the base name (the last component of the path) for a given <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p>
1701 <p>If called for the top level of a system (such as the filesystem root
1702 or a uri like sftp://host/) it will return a single directory separator
1703 (and on Windows, possibly a drive letter).</p>
1704 <p>The base name is a byte string (not UTF-8). It has no defined encoding
1705 or rules other than it may not contain zero bytes. If you want to use
1706 filenames in a user interface you should use the display name that you
1707 can get by requesting the <a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-DISPLAY-NAME:CAPS" title="G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME"><code class="literal">G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</code></a>
1708 attribute with <a class="link" href="GFile.html#g-file-query-info" title="g_file_query_info ()"><code class="function">g_file_query_info()</code></a>.</p>
1709 <p>This call does no blocking I/O.</p>
1710 <div class="refsect3">
1711 <a name="g-file-get-basename.parameters"></a><h4>Parameters</h4>
1712 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1714 <col width="150px" class="parameters_name">
1715 <col class="parameters_description">
1716 <col width="200px" class="parameters_annotations">
1719 <td class="parameter_name"><p>file</p></td>
1720 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
1721 <td class="parameter_annotations"> </td>
1725 <div class="refsect3">
1726 <a name="g-file-get-basename.returns"></a><h4>Returns</h4>
1727 <p> string containing the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>'s
1728 base name, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if given <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> is invalid. The returned string
1729 should be freed with <a href="../glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when no longer needed. </p>
1730 <p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
1734 <div class="refsect2">
1735 <a name="g-file-get-path"></a><h3>g_file_get_path ()</h3>
1736 <pre class="programlisting"><span class="returnvalue">char</span> *
1737 g_file_get_path (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>);</pre>
1738 <p>Gets the local pathname for <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>, if one exists. If non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, this is
1739 guaranteed to be an absolute, canonical path. It might contain symlinks.</p>
1740 <p>This call does no blocking I/O.</p>
1741 <div class="refsect3">
1742 <a name="g-file-get-path.parameters"></a><h4>Parameters</h4>
1743 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1745 <col width="150px" class="parameters_name">
1746 <col class="parameters_description">
1747 <col width="200px" class="parameters_annotations">
1750 <td class="parameter_name"><p>file</p></td>
1751 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
1752 <td class="parameter_annotations"> </td>
1756 <div class="refsect3">
1757 <a name="g-file-get-path.returns"></a><h4>Returns</h4>
1758 <p> string containing the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>'s path,
1759 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no such path exists. The returned string should be freed
1760 with <a href="../glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when no longer needed. </p>
1761 <p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
1765 <div class="refsect2">
1766 <a name="g-file-get-uri"></a><h3>g_file_get_uri ()</h3>
1767 <pre class="programlisting"><span class="returnvalue">char</span> *
1768 g_file_get_uri (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>);</pre>
1769 <p>Gets the URI for the <em class="parameter"><code>file</code></em>
1771 <p>This call does no blocking I/O.</p>
1772 <div class="refsect3">
1773 <a name="g-file-get-uri.parameters"></a><h4>Parameters</h4>
1774 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1776 <col width="150px" class="parameters_name">
1777 <col class="parameters_description">
1778 <col width="200px" class="parameters_annotations">
1781 <td class="parameter_name"><p>file</p></td>
1782 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
1783 <td class="parameter_annotations"> </td>
1787 <div class="refsect3">
1788 <a name="g-file-get-uri.returns"></a><h4>Returns</h4>
1789 <p> a string containing the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>'s URI.
1790 The returned string should be freed with <a href="../glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>
1791 when no longer needed.</p>
1795 <div class="refsect2">
1796 <a name="g-file-get-parse-name"></a><h3>g_file_get_parse_name ()</h3>
1797 <pre class="programlisting"><span class="returnvalue">char</span> *
1798 g_file_get_parse_name (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>);</pre>
1799 <p>Gets the parse name of the <em class="parameter"><code>file</code></em>
1801 A parse name is a UTF-8 string that describes the
1802 file such that one can get the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> back using
1803 <a class="link" href="GFile.html#g-file-parse-name" title="g_file_parse_name ()"><code class="function">g_file_parse_name()</code></a>.</p>
1804 <p>This is generally used to show the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> as a nice
1805 full-pathname kind of string in a user interface,
1806 like in a location entry.</p>
1807 <p>For local files with names that can safely be converted
1808 to UTF-8 the pathname is used, otherwise the IRI is used
1809 (a form of URI that allows UTF-8 characters unescaped).</p>
1810 <p>This call does no blocking I/O.</p>
1811 <div class="refsect3">
1812 <a name="g-file-get-parse-name.parameters"></a><h4>Parameters</h4>
1813 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1815 <col width="150px" class="parameters_name">
1816 <col class="parameters_description">
1817 <col width="200px" class="parameters_annotations">
1820 <td class="parameter_name"><p>file</p></td>
1821 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
1822 <td class="parameter_annotations"> </td>
1826 <div class="refsect3">
1827 <a name="g-file-get-parse-name.returns"></a><h4>Returns</h4>
1828 <p> a string containing the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>'s parse name.
1829 The returned string should be freed with <a href="../glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>
1830 when no longer needed.</p>
1834 <div class="refsect2">
1835 <a name="g-file-get-parent"></a><h3>g_file_get_parent ()</h3>
1836 <pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
1837 g_file_get_parent (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>);</pre>
1838 <p>Gets the parent directory for the <em class="parameter"><code>file</code></em>
1840 If the <em class="parameter"><code>file</code></em>
1841 represents the root directory of the
1842 file system, then <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will be returned.</p>
1843 <p>This call does no blocking I/O.</p>
1844 <div class="refsect3">
1845 <a name="g-file-get-parent.parameters"></a><h4>Parameters</h4>
1846 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1848 <col width="150px" class="parameters_name">
1849 <col class="parameters_description">
1850 <col width="200px" class="parameters_annotations">
1853 <td class="parameter_name"><p>file</p></td>
1854 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
1855 <td class="parameter_annotations"> </td>
1859 <div class="refsect3">
1860 <a name="g-file-get-parent.returns"></a><h4>Returns</h4>
1861 <p> a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> structure to the
1862 parent of the given <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is no parent. Free
1863 the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
1864 <p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1868 <div class="refsect2">
1869 <a name="g-file-has-parent"></a><h3>g_file_has_parent ()</h3>
1870 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1871 g_file_has_parent (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
1872 <em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *parent</code></em>);</pre>
1873 <p>Checks if <em class="parameter"><code>file</code></em>
1874 has a parent, and optionally, if it is <em class="parameter"><code>parent</code></em>
1876 <p>If <em class="parameter"><code>parent</code></em>
1877 is <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then this function returns <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>file</code></em>
1879 parent at all. If <em class="parameter"><code>parent</code></em>
1880 is non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is only returned
1881 if <em class="parameter"><code>file</code></em>
1882 is an immediate child of <em class="parameter"><code>parent</code></em>
1884 <div class="refsect3">
1885 <a name="g-file-has-parent.parameters"></a><h4>Parameters</h4>
1886 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1888 <col width="150px" class="parameters_name">
1889 <col class="parameters_description">
1890 <col width="200px" class="parameters_annotations">
1894 <td class="parameter_name"><p>file</p></td>
1895 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
1896 <td class="parameter_annotations"> </td>
1899 <td class="parameter_name"><p>parent</p></td>
1900 <td class="parameter_description"><p> the parent to check for, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1901 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
1906 <div class="refsect3">
1907 <a name="g-file-has-parent.returns"></a><h4>Returns</h4>
1908 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>file</code></em>
1909 is an immediate child of <em class="parameter"><code>parent</code></em>
1911 the case that <em class="parameter"><code>parent</code></em>
1912 is <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</p>
1914 <p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
1917 <div class="refsect2">
1918 <a name="g-file-get-child"></a><h3>g_file_get_child ()</h3>
1919 <pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
1920 g_file_get_child (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
1921 <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
1922 <p>Gets a child of <em class="parameter"><code>file</code></em>
1923 with basename equal to <em class="parameter"><code>name</code></em>
1925 <p>Note that the file with that specific name might not exist, but
1926 you can still have a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> that points to it. You can use this
1927 for instance to create that file.</p>
1928 <p>This call does no blocking I/O.</p>
1929 <div class="refsect3">
1930 <a name="g-file-get-child.parameters"></a><h4>Parameters</h4>
1931 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1933 <col width="150px" class="parameters_name">
1934 <col class="parameters_description">
1935 <col width="200px" class="parameters_annotations">
1939 <td class="parameter_name"><p>file</p></td>
1940 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
1941 <td class="parameter_annotations"> </td>
1944 <td class="parameter_name"><p>name</p></td>
1945 <td class="parameter_description"><p> string containing the child's basename. </p></td>
1946 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename]</span></td>
1951 <div class="refsect3">
1952 <a name="g-file-get-child.returns"></a><h4>Returns</h4>
1953 <p> a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> to a child specified by <em class="parameter"><code>name</code></em>
1955 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
1956 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1960 <div class="refsect2">
1961 <a name="g-file-get-child-for-display-name"></a><h3>g_file_get_child_for_display_name ()</h3>
1962 <pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
1963 g_file_get_child_for_display_name (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
1964 <em class="parameter"><code>const <span class="type">char</span> *display_name</code></em>,
1965 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1966 <p>Gets the child of <em class="parameter"><code>file</code></em>
1967 for a given <em class="parameter"><code>display_name</code></em>
1969 version of the name). If this function fails, it returns <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1970 and <em class="parameter"><code>error</code></em>
1971 will be set. This is very useful when constructing a
1972 <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> for a new file and the user entered the filename in the
1973 user interface, for instance when you select a directory and
1974 type a filename in the file selector.</p>
1975 <p>This call does no blocking I/O.</p>
1976 <div class="refsect3">
1977 <a name="g-file-get-child-for-display-name.parameters"></a><h4>Parameters</h4>
1978 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1980 <col width="150px" class="parameters_name">
1981 <col class="parameters_description">
1982 <col width="200px" class="parameters_annotations">
1986 <td class="parameter_name"><p>file</p></td>
1987 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
1988 <td class="parameter_annotations"> </td>
1991 <td class="parameter_name"><p>display_name</p></td>
1992 <td class="parameter_description"><p>string to a possible child</p></td>
1993 <td class="parameter_annotations"> </td>
1996 <td class="parameter_name"><p>error</p></td>
1997 <td class="parameter_description"><p>return location for an error</p></td>
1998 <td class="parameter_annotations"> </td>
2003 <div class="refsect3">
2004 <a name="g-file-get-child-for-display-name.returns"></a><h4>Returns</h4>
2005 <p> a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> to the specified child, or
2006 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the display name couldn't be converted.
2007 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
2008 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2012 <div class="refsect2">
2013 <a name="g-file-has-prefix"></a><h3>g_file_has_prefix ()</h3>
2014 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2015 g_file_has_prefix (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2016 <em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *prefix</code></em>);</pre>
2017 <p>Checks whether <em class="parameter"><code>file</code></em>
2018 has the prefix specified by <em class="parameter"><code>prefix</code></em>
2020 <p>In other words, if the names of initial elements of <em class="parameter"><code>file</code></em>
2022 pathname match <em class="parameter"><code>prefix</code></em>
2023 . Only full pathname elements are matched,
2024 so a path like /foo is not considered a prefix of /foobar, only
2026 <p>A <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> is not a prefix of itself. If you want to check for
2027 equality, use <a class="link" href="GFile.html#g-file-equal" title="g_file_equal ()"><code class="function">g_file_equal()</code></a>.</p>
2028 <p>This call does no I/O, as it works purely on names. As such it can
2029 sometimes return <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> even if <em class="parameter"><code>file</code></em>
2030 is inside a <em class="parameter"><code>prefix</code></em>
2032 filesystem point of view), because the prefix of <em class="parameter"><code>file</code></em>
2034 of <em class="parameter"><code>prefix</code></em>
2036 <p>Virtual: prefix_matches</p>
2037 <div class="refsect3">
2038 <a name="g-file-has-prefix.parameters"></a><h4>Parameters</h4>
2039 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2041 <col width="150px" class="parameters_name">
2042 <col class="parameters_description">
2043 <col width="200px" class="parameters_annotations">
2047 <td class="parameter_name"><p>file</p></td>
2048 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2049 <td class="parameter_annotations"> </td>
2052 <td class="parameter_name"><p>prefix</p></td>
2053 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2054 <td class="parameter_annotations"> </td>
2059 <div class="refsect3">
2060 <a name="g-file-has-prefix.returns"></a><h4>Returns</h4>
2061 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>files</code></em>
2062 's parent, grandparent, etc is <em class="parameter"><code>prefix</code></em>
2064 <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
2068 <div class="refsect2">
2069 <a name="g-file-get-relative-path"></a><h3>g_file_get_relative_path ()</h3>
2070 <pre class="programlisting"><span class="returnvalue">char</span> *
2071 g_file_get_relative_path (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *parent</code></em>,
2072 <em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *descendant</code></em>);</pre>
2073 <p>Gets the path for <em class="parameter"><code>descendant</code></em>
2074 relative to <em class="parameter"><code>parent</code></em>
2076 <p>This call does no blocking I/O.</p>
2077 <div class="refsect3">
2078 <a name="g-file-get-relative-path.parameters"></a><h4>Parameters</h4>
2079 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2081 <col width="150px" class="parameters_name">
2082 <col class="parameters_description">
2083 <col width="200px" class="parameters_annotations">
2087 <td class="parameter_name"><p>parent</p></td>
2088 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2089 <td class="parameter_annotations"> </td>
2092 <td class="parameter_name"><p>descendant</p></td>
2093 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2094 <td class="parameter_annotations"> </td>
2099 <div class="refsect3">
2100 <a name="g-file-get-relative-path.returns"></a><h4>Returns</h4>
2101 <p> string with the relative path from
2102 <em class="parameter"><code>descendant</code></em>
2103 to <em class="parameter"><code>parent</code></em>
2104 , or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>descendant</code></em>
2105 doesn't have <em class="parameter"><code>parent</code></em>
2107 prefix. The returned string should be freed with <a href="../glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when
2108 no longer needed. </p>
2109 <p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
2113 <div class="refsect2">
2114 <a name="g-file-resolve-relative-path"></a><h3>g_file_resolve_relative_path ()</h3>
2115 <pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
2116 g_file_resolve_relative_path (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2117 <em class="parameter"><code>const <span class="type">char</span> *relative_path</code></em>);</pre>
2118 <p>Resolves a relative path for <em class="parameter"><code>file</code></em>
2119 to an absolute path.</p>
2120 <p>This call does no blocking I/O.</p>
2121 <div class="refsect3">
2122 <a name="g-file-resolve-relative-path.parameters"></a><h4>Parameters</h4>
2123 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2125 <col width="150px" class="parameters_name">
2126 <col class="parameters_description">
2127 <col width="200px" class="parameters_annotations">
2131 <td class="parameter_name"><p>file</p></td>
2132 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2133 <td class="parameter_annotations"> </td>
2136 <td class="parameter_name"><p>relative_path</p></td>
2137 <td class="parameter_description"><p> a given relative path string. </p></td>
2138 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename]</span></td>
2143 <div class="refsect3">
2144 <a name="g-file-resolve-relative-path.returns"></a><h4>Returns</h4>
2145 <p> <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> to the resolved path.
2146 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>relative_path</code></em>
2147 is <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> or if <em class="parameter"><code>file</code></em>
2149 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
2150 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2154 <div class="refsect2">
2155 <a name="g-file-is-native"></a><h3>g_file_is_native ()</h3>
2156 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2157 g_file_is_native (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>);</pre>
2158 <p>Checks to see if a file is native to the platform.</p>
2159 <p>A native file s one expressed in the platform-native filename format,
2160 e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local,
2161 as it might be on a locally mounted remote filesystem.</p>
2162 <p>On some systems non-native files may be available using the native
2163 filesystem via a userspace filesystem (FUSE), in these cases this call
2164 will return <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, but <a class="link" href="GFile.html#g-file-get-path" title="g_file_get_path ()"><code class="function">g_file_get_path()</code></a> will still return a native path.</p>
2165 <p>This call does no blocking I/O.</p>
2166 <div class="refsect3">
2167 <a name="g-file-is-native.parameters"></a><h4>Parameters</h4>
2168 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2170 <col width="150px" class="parameters_name">
2171 <col class="parameters_description">
2172 <col width="200px" class="parameters_annotations">
2175 <td class="parameter_name"><p>file</p></td>
2176 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2177 <td class="parameter_annotations"> </td>
2181 <div class="refsect3">
2182 <a name="g-file-is-native.returns"></a><h4>Returns</h4>
2183 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>file</code></em>
2188 <div class="refsect2">
2189 <a name="g-file-has-uri-scheme"></a><h3>g_file_has_uri_scheme ()</h3>
2190 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2191 g_file_has_uri_scheme (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2192 <em class="parameter"><code>const <span class="type">char</span> *uri_scheme</code></em>);</pre>
2193 <p>Checks to see if a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> has a given URI scheme.</p>
2194 <p>This call does no blocking I/O.</p>
2195 <div class="refsect3">
2196 <a name="g-file-has-uri-scheme.parameters"></a><h4>Parameters</h4>
2197 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2199 <col width="150px" class="parameters_name">
2200 <col class="parameters_description">
2201 <col width="200px" class="parameters_annotations">
2205 <td class="parameter_name"><p>file</p></td>
2206 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2207 <td class="parameter_annotations"> </td>
2210 <td class="parameter_name"><p>uri_scheme</p></td>
2211 <td class="parameter_description"><p>a string containing a URI scheme</p></td>
2212 <td class="parameter_annotations"> </td>
2217 <div class="refsect3">
2218 <a name="g-file-has-uri-scheme.returns"></a><h4>Returns</h4>
2219 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>'s backend supports the
2220 given URI scheme, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if URI scheme is <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>,
2221 not supported, or <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> is invalid.</p>
2225 <div class="refsect2">
2226 <a name="g-file-get-uri-scheme"></a><h3>g_file_get_uri_scheme ()</h3>
2227 <pre class="programlisting"><span class="returnvalue">char</span> *
2228 g_file_get_uri_scheme (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>);</pre>
2229 <p>Gets the URI scheme for a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.
2230 RFC 3986 decodes the scheme as:</p>
2231 <div class="informalexample">
2232 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
2235 <td class="listing_lines" align="right"><pre>1</pre></td>
2236 <td class="listing_code"><pre class="programlisting">URI <span class="gtkdoc opt">=</span> scheme <span class="string">":"</span> hier<span class="gtkdoc opt">-</span>part <span class="gtkdoc opt">[</span> <span class="string">"?"</span> query <span class="gtkdoc opt">] [</span> <span class="string">"#"</span> fragment <span class="gtkdoc opt">]</span></pre></td>
2243 Common schemes include "file", "http", "ftp", etc.</p>
2244 <p>This call does no blocking I/O.</p>
2245 <div class="refsect3">
2246 <a name="g-file-get-uri-scheme.parameters"></a><h4>Parameters</h4>
2247 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2249 <col width="150px" class="parameters_name">
2250 <col class="parameters_description">
2251 <col width="200px" class="parameters_annotations">
2254 <td class="parameter_name"><p>file</p></td>
2255 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2256 <td class="parameter_annotations"> </td>
2260 <div class="refsect3">
2261 <a name="g-file-get-uri-scheme.returns"></a><h4>Returns</h4>
2262 <p> a string containing the URI scheme for the given
2263 <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>. The returned string should be freed with <a href="../glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>
2264 when no longer needed.</p>
2268 <div class="refsect2">
2269 <a name="g-file-read"></a><h3>g_file_read ()</h3>
2270 <pre class="programlisting"><a class="link" href="GFileInputStream.html" title="GFileInputStream"><span class="returnvalue">GFileInputStream</span></a> *
2271 g_file_read (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2272 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2273 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2274 <p>Opens a file for reading. The result is a <a class="link" href="GFileInputStream.html" title="GFileInputStream"><span class="type">GFileInputStream</span></a> that
2275 can be used to read the contents of the file.</p>
2276 <p>If <em class="parameter"><code>cancellable</code></em>
2277 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
2278 triggering the cancellable object from another thread. If the operation
2279 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 returned.</p>
2280 <p>If the file does not exist, the <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-FOUND:CAPS"><code class="literal">G_IO_ERROR_NOT_FOUND</code></a> error will be
2281 returned. If the file is a directory, the <a class="link" href="gio-GIOError.html#G-IO-ERROR-IS-DIRECTORY:CAPS"><code class="literal">G_IO_ERROR_IS_DIRECTORY</code></a>
2282 error will be returned. Other errors are possible too, and depend
2283 on what kind of filesystem the file is on.</p>
2284 <p>Virtual: read_fn</p>
2285 <div class="refsect3">
2286 <a name="g-file-read.parameters"></a><h4>Parameters</h4>
2287 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2289 <col width="150px" class="parameters_name">
2290 <col class="parameters_description">
2291 <col width="200px" class="parameters_annotations">
2295 <td class="parameter_name"><p>file</p></td>
2296 <td class="parameter_description"><p><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> to read</p></td>
2297 <td class="parameter_annotations"> </td>
2300 <td class="parameter_name"><p>cancellable</p></td>
2301 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>. </p></td>
2302 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
2305 <td class="parameter_name"><p>error</p></td>
2306 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2307 <td class="parameter_annotations"> </td>
2312 <div class="refsect3">
2313 <a name="g-file-read.returns"></a><h4>Returns</h4>
2314 <p> <a class="link" href="GFileInputStream.html" title="GFileInputStream"><span class="type">GFileInputStream</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
2315 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
2316 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2320 <div class="refsect2">
2321 <a name="g-file-read-async"></a><h3>g_file_read_async ()</h3>
2322 <pre class="programlisting"><span class="returnvalue">void</span>
2323 g_file_read_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2324 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
2325 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2326 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
2327 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
2328 <p>Asynchronously opens <em class="parameter"><code>file</code></em>
2330 <p>For more details, see <a class="link" href="GFile.html#g-file-read" title="g_file_read ()"><code class="function">g_file_read()</code></a> which is
2331 the synchronous version of this call.</p>
2332 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
2334 You can then call <a class="link" href="GFile.html#g-file-read-finish" title="g_file_read_finish ()"><code class="function">g_file_read_finish()</code></a> to get the result
2335 of the operation.</p>
2336 <div class="refsect3">
2337 <a name="g-file-read-async.parameters"></a><h4>Parameters</h4>
2338 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2340 <col width="150px" class="parameters_name">
2341 <col class="parameters_description">
2342 <col width="200px" class="parameters_annotations">
2346 <td class="parameter_name"><p>file</p></td>
2347 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2348 <td class="parameter_annotations"> </td>
2351 <td class="parameter_name"><p>io_priority</p></td>
2352 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
2353 <td class="parameter_annotations"> </td>
2356 <td class="parameter_name"><p>cancellable</p></td>
2357 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
2358 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
2359 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
2362 <td class="parameter_name"><p>callback</p></td>
2363 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
2364 when the request is satisfied. </p></td>
2365 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
2368 <td class="parameter_name"><p>user_data</p></td>
2369 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
2370 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
2377 <div class="refsect2">
2378 <a name="g-file-read-finish"></a><h3>g_file_read_finish ()</h3>
2379 <pre class="programlisting"><a class="link" href="GFileInputStream.html" title="GFileInputStream"><span class="returnvalue">GFileInputStream</span></a> *
2380 g_file_read_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2381 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
2382 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2383 <p>Finishes an asynchronous file read operation started with
2384 <a class="link" href="GFile.html#g-file-read-async" title="g_file_read_async ()"><code class="function">g_file_read_async()</code></a>.</p>
2385 <div class="refsect3">
2386 <a name="g-file-read-finish.parameters"></a><h4>Parameters</h4>
2387 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2389 <col width="150px" class="parameters_name">
2390 <col class="parameters_description">
2391 <col width="200px" class="parameters_annotations">
2395 <td class="parameter_name"><p>file</p></td>
2396 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2397 <td class="parameter_annotations"> </td>
2400 <td class="parameter_name"><p>res</p></td>
2401 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
2402 <td class="parameter_annotations"> </td>
2405 <td class="parameter_name"><p>error</p></td>
2406 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2407 <td class="parameter_annotations"> </td>
2412 <div class="refsect3">
2413 <a name="g-file-read-finish.returns"></a><h4>Returns</h4>
2414 <p> a <a class="link" href="GFileInputStream.html" title="GFileInputStream"><span class="type">GFileInputStream</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
2415 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
2416 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2420 <div class="refsect2">
2421 <a name="g-file-append-to"></a><h3>g_file_append_to ()</h3>
2422 <pre class="programlisting"><a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="returnvalue">GFileOutputStream</span></a> *
2423 g_file_append_to (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2424 <em class="parameter"><code><a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a> flags</code></em>,
2425 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2426 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2427 <p>Gets an output stream for appending data to the file.
2428 If the file doesn't already exist it is created.</p>
2429 <p>By default files created are generally readable by everyone,
2430 but if you pass <a class="link" href="GFile.html#G-FILE-CREATE-PRIVATE:CAPS"><span class="type">G_FILE_CREATE_PRIVATE</span></a> in <em class="parameter"><code>flags</code></em>
2432 will be made readable only to the current user, to the level that
2433 is supported on the target filesystem.</p>
2434 <p>If <em class="parameter"><code>cancellable</code></em>
2435 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled
2436 by triggering the cancellable object from another thread. If the
2437 operation 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
2439 <p>Some file systems don't allow all file names, and may return an
2440 <a class="link" href="gio-GIOError.html#G-IO-ERROR-INVALID-FILENAME:CAPS"><code class="literal">G_IO_ERROR_INVALID_FILENAME</code></a> error. If the file is a directory the
2441 <a class="link" href="gio-GIOError.html#G-IO-ERROR-IS-DIRECTORY:CAPS"><code class="literal">G_IO_ERROR_IS_DIRECTORY</code></a> error will be returned. Other errors are
2442 possible too, and depend on what kind of filesystem the file is on.</p>
2443 <div class="refsect3">
2444 <a name="g-file-append-to.parameters"></a><h4>Parameters</h4>
2445 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2447 <col width="150px" class="parameters_name">
2448 <col class="parameters_description">
2449 <col width="200px" class="parameters_annotations">
2453 <td class="parameter_name"><p>file</p></td>
2454 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2455 <td class="parameter_annotations"> </td>
2458 <td class="parameter_name"><p>flags</p></td>
2459 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a></p></td>
2460 <td class="parameter_annotations"> </td>
2463 <td class="parameter_name"><p>cancellable</p></td>
2464 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
2465 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
2466 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
2469 <td class="parameter_name"><p>error</p></td>
2470 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2471 <td class="parameter_annotations"> </td>
2476 <div class="refsect3">
2477 <a name="g-file-append-to.returns"></a><h4>Returns</h4>
2478 <p> a <a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="type">GFileOutputStream</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
2479 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
2480 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2484 <div class="refsect2">
2485 <a name="g-file-create"></a><h3>g_file_create ()</h3>
2486 <pre class="programlisting"><a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="returnvalue">GFileOutputStream</span></a> *
2487 g_file_create (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2488 <em class="parameter"><code><a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a> flags</code></em>,
2489 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2490 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2491 <p>Creates a new file and returns an output stream for writing to it.
2492 The file must not already exist.</p>
2493 <p>By default files created are generally readable by everyone,
2494 but if you pass <a class="link" href="GFile.html#G-FILE-CREATE-PRIVATE:CAPS"><span class="type">G_FILE_CREATE_PRIVATE</span></a> in <em class="parameter"><code>flags</code></em>
2496 will be made readable only to the current user, to the level
2497 that is supported on the target filesystem.</p>
2498 <p>If <em class="parameter"><code>cancellable</code></em>
2499 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled
2500 by triggering the cancellable object from another thread. If the
2501 operation 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
2503 <p>If a file or directory with this name already exists the
2504 <a class="link" href="gio-GIOError.html#G-IO-ERROR-EXISTS:CAPS"><code class="literal">G_IO_ERROR_EXISTS</code></a> error will be returned. Some file systems don't
2505 allow all file names, and may return an <a class="link" href="gio-GIOError.html#G-IO-ERROR-INVALID-FILENAME:CAPS"><code class="literal">G_IO_ERROR_INVALID_FILENAME</code></a>
2506 error, and if the name is to long <a class="link" href="gio-GIOError.html#G-IO-ERROR-FILENAME-TOO-LONG:CAPS"><code class="literal">G_IO_ERROR_FILENAME_TOO_LONG</code></a> will
2507 be returned. Other errors are possible too, and depend on what kind
2508 of filesystem the file is on.</p>
2509 <div class="refsect3">
2510 <a name="g-file-create.parameters"></a><h4>Parameters</h4>
2511 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2513 <col width="150px" class="parameters_name">
2514 <col class="parameters_description">
2515 <col width="200px" class="parameters_annotations">
2519 <td class="parameter_name"><p>file</p></td>
2520 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2521 <td class="parameter_annotations"> </td>
2524 <td class="parameter_name"><p>flags</p></td>
2525 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a></p></td>
2526 <td class="parameter_annotations"> </td>
2529 <td class="parameter_name"><p>cancellable</p></td>
2530 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
2531 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
2532 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
2535 <td class="parameter_name"><p>error</p></td>
2536 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2537 <td class="parameter_annotations"> </td>
2542 <div class="refsect3">
2543 <a name="g-file-create.returns"></a><h4>Returns</h4>
2544 <p> a <a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="type">GFileOutputStream</span></a> for the newly created
2545 file, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
2546 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
2547 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2551 <div class="refsect2">
2552 <a name="g-file-replace"></a><h3>g_file_replace ()</h3>
2553 <pre class="programlisting"><a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="returnvalue">GFileOutputStream</span></a> *
2554 g_file_replace (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2555 <em class="parameter"><code>const <span class="type">char</span> *etag</code></em>,
2556 <em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> make_backup</code></em>,
2557 <em class="parameter"><code><a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a> flags</code></em>,
2558 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2559 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2560 <p>Returns an output stream for overwriting the file, possibly
2561 creating a backup copy of the file first. If the file doesn't exist,
2562 it will be created.</p>
2563 <p>This will try to replace the file in the safest way possible so
2564 that any errors during the writing will not affect an already
2565 existing copy of the file. For instance, for local files it
2566 may write to a temporary file and then atomically rename over
2567 the destination when the stream is closed.</p>
2568 <p>By default files created are generally readable by everyone,
2569 but if you pass <a class="link" href="GFile.html#G-FILE-CREATE-PRIVATE:CAPS"><span class="type">G_FILE_CREATE_PRIVATE</span></a> in <em class="parameter"><code>flags</code></em>
2571 will be made readable only to the current user, to the level that
2572 is supported on the target filesystem.</p>
2573 <p>If <em class="parameter"><code>cancellable</code></em>
2574 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled
2575 by triggering the cancellable object from another thread. If the
2576 operation 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
2578 <p>If you pass in a non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <em class="parameter"><code>etag</code></em>
2579 value and <em class="parameter"><code>file</code></em>
2580 already exists, then
2581 this value is compared to the current entity tag of the file, and if
2582 they differ an <a class="link" href="gio-GIOError.html#G-IO-ERROR-WRONG-ETAG:CAPS"><code class="literal">G_IO_ERROR_WRONG_ETAG</code></a> error is returned. This
2583 generally means that the file has been changed since you last read
2584 it. You can get the new etag from <a class="link" href="GFileOutputStream.html#g-file-output-stream-get-etag" title="g_file_output_stream_get_etag ()"><code class="function">g_file_output_stream_get_etag()</code></a>
2585 after you've finished writing and closed the <a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="type">GFileOutputStream</span></a>. When
2586 you load a new file you can use <a class="link" href="GFileInputStream.html#g-file-input-stream-query-info" title="g_file_input_stream_query_info ()"><code class="function">g_file_input_stream_query_info()</code></a> to
2587 get the etag of the file.</p>
2588 <p>If <em class="parameter"><code>make_backup</code></em>
2589 is <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, this function will attempt to make a
2590 backup of the current file before overwriting it. If this fails
2591 a <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANT-CREATE-BACKUP:CAPS"><code class="literal">G_IO_ERROR_CANT_CREATE_BACKUP</code></a> error will be returned. If you
2592 want to replace anyway, try again with <em class="parameter"><code>make_backup</code></em>
2593 set to <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
2594 <p>If the file is a directory the <a class="link" href="gio-GIOError.html#G-IO-ERROR-IS-DIRECTORY:CAPS"><code class="literal">G_IO_ERROR_IS_DIRECTORY</code></a> error will
2595 be returned, and if the file is some other form of non-regular file
2596 then a <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-REGULAR-FILE:CAPS"><code class="literal">G_IO_ERROR_NOT_REGULAR_FILE</code></a> error will be returned. Some
2597 file systems don't allow all file names, and may return an
2598 <a class="link" href="gio-GIOError.html#G-IO-ERROR-INVALID-FILENAME:CAPS"><code class="literal">G_IO_ERROR_INVALID_FILENAME</code></a> error, and if the name is to long
2599 <a class="link" href="gio-GIOError.html#G-IO-ERROR-FILENAME-TOO-LONG:CAPS"><code class="literal">G_IO_ERROR_FILENAME_TOO_LONG</code></a> will be returned. Other errors are
2600 possible too, and depend on what kind of filesystem the file is on.</p>
2601 <div class="refsect3">
2602 <a name="g-file-replace.parameters"></a><h4>Parameters</h4>
2603 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2605 <col width="150px" class="parameters_name">
2606 <col class="parameters_description">
2607 <col width="200px" class="parameters_annotations">
2611 <td class="parameter_name"><p>file</p></td>
2612 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2613 <td class="parameter_annotations"> </td>
2616 <td class="parameter_name"><p>etag</p></td>
2617 <td class="parameter_description"><p> an optional <a class="link" href="GFile.html#gfile-etag" title="Entity Tags">entity tag</a>
2618 for the current <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> to ignore. </p></td>
2619 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
2622 <td class="parameter_name"><p>make_backup</p></td>
2623 <td class="parameter_description"><p><a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if a backup should be created</p></td>
2624 <td class="parameter_annotations"> </td>
2627 <td class="parameter_name"><p>flags</p></td>
2628 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a></p></td>
2629 <td class="parameter_annotations"> </td>
2632 <td class="parameter_name"><p>cancellable</p></td>
2633 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
2634 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
2635 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
2638 <td class="parameter_name"><p>error</p></td>
2639 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2640 <td class="parameter_annotations"> </td>
2645 <div class="refsect3">
2646 <a name="g-file-replace.returns"></a><h4>Returns</h4>
2647 <p> a <a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="type">GFileOutputStream</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
2648 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
2649 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2653 <div class="refsect2">
2654 <a name="g-file-append-to-async"></a><h3>g_file_append_to_async ()</h3>
2655 <pre class="programlisting"><span class="returnvalue">void</span>
2656 g_file_append_to_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2657 <em class="parameter"><code><a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a> flags</code></em>,
2658 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
2659 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2660 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
2661 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
2662 <p>Asynchronously opens <em class="parameter"><code>file</code></em>
2664 <p>For more details, see <a class="link" href="GFile.html#g-file-append-to" title="g_file_append_to ()"><code class="function">g_file_append_to()</code></a> which is
2665 the synchronous version of this call.</p>
2666 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
2668 You can then call <a class="link" href="GFile.html#g-file-append-to-finish" title="g_file_append_to_finish ()"><code class="function">g_file_append_to_finish()</code></a> to get the result
2669 of the operation.</p>
2670 <div class="refsect3">
2671 <a name="g-file-append-to-async.parameters"></a><h4>Parameters</h4>
2672 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2674 <col width="150px" class="parameters_name">
2675 <col class="parameters_description">
2676 <col width="200px" class="parameters_annotations">
2680 <td class="parameter_name"><p>file</p></td>
2681 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2682 <td class="parameter_annotations"> </td>
2685 <td class="parameter_name"><p>flags</p></td>
2686 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a></p></td>
2687 <td class="parameter_annotations"> </td>
2690 <td class="parameter_name"><p>io_priority</p></td>
2691 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
2692 <td class="parameter_annotations"> </td>
2695 <td class="parameter_name"><p>cancellable</p></td>
2696 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
2697 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
2698 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
2701 <td class="parameter_name"><p>callback</p></td>
2702 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
2703 when the request is satisfied. </p></td>
2704 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
2707 <td class="parameter_name"><p>user_data</p></td>
2708 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
2709 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
2716 <div class="refsect2">
2717 <a name="g-file-append-to-finish"></a><h3>g_file_append_to_finish ()</h3>
2718 <pre class="programlisting"><a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="returnvalue">GFileOutputStream</span></a> *
2719 g_file_append_to_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2720 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
2721 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2722 <p>Finishes an asynchronous file append operation started with
2723 <a class="link" href="GFile.html#g-file-append-to-async" title="g_file_append_to_async ()"><code class="function">g_file_append_to_async()</code></a>.</p>
2724 <div class="refsect3">
2725 <a name="g-file-append-to-finish.parameters"></a><h4>Parameters</h4>
2726 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2728 <col width="150px" class="parameters_name">
2729 <col class="parameters_description">
2730 <col width="200px" class="parameters_annotations">
2734 <td class="parameter_name"><p>file</p></td>
2735 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2736 <td class="parameter_annotations"> </td>
2739 <td class="parameter_name"><p>res</p></td>
2740 <td class="parameter_description"><p><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
2741 <td class="parameter_annotations"> </td>
2744 <td class="parameter_name"><p>error</p></td>
2745 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2746 <td class="parameter_annotations"> </td>
2751 <div class="refsect3">
2752 <a name="g-file-append-to-finish.returns"></a><h4>Returns</h4>
2753 <p> a valid <a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="type">GFileOutputStream</span></a>
2754 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
2755 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
2756 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2760 <div class="refsect2">
2761 <a name="g-file-create-async"></a><h3>g_file_create_async ()</h3>
2762 <pre class="programlisting"><span class="returnvalue">void</span>
2763 g_file_create_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2764 <em class="parameter"><code><a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a> flags</code></em>,
2765 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
2766 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2767 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
2768 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
2769 <p>Asynchronously creates a new file and returns an output stream
2770 for writing to it. The file must not already exist.</p>
2771 <p>For more details, see <a class="link" href="GFile.html#g-file-create" title="g_file_create ()"><code class="function">g_file_create()</code></a> which is
2772 the synchronous version of this call.</p>
2773 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
2775 You can then call <a class="link" href="GFile.html#g-file-create-finish" title="g_file_create_finish ()"><code class="function">g_file_create_finish()</code></a> to get the result
2776 of the operation.</p>
2777 <div class="refsect3">
2778 <a name="g-file-create-async.parameters"></a><h4>Parameters</h4>
2779 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2781 <col width="150px" class="parameters_name">
2782 <col class="parameters_description">
2783 <col width="200px" class="parameters_annotations">
2787 <td class="parameter_name"><p>file</p></td>
2788 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2789 <td class="parameter_annotations"> </td>
2792 <td class="parameter_name"><p>flags</p></td>
2793 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a></p></td>
2794 <td class="parameter_annotations"> </td>
2797 <td class="parameter_name"><p>io_priority</p></td>
2798 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
2799 <td class="parameter_annotations"> </td>
2802 <td class="parameter_name"><p>cancellable</p></td>
2803 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
2804 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
2805 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
2808 <td class="parameter_name"><p>callback</p></td>
2809 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
2810 when the request is satisfied. </p></td>
2811 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
2814 <td class="parameter_name"><p>user_data</p></td>
2815 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
2816 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
2823 <div class="refsect2">
2824 <a name="g-file-create-finish"></a><h3>g_file_create_finish ()</h3>
2825 <pre class="programlisting"><a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="returnvalue">GFileOutputStream</span></a> *
2826 g_file_create_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2827 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
2828 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2829 <p>Finishes an asynchronous file create operation started with
2830 <a class="link" href="GFile.html#g-file-create-async" title="g_file_create_async ()"><code class="function">g_file_create_async()</code></a>.</p>
2831 <div class="refsect3">
2832 <a name="g-file-create-finish.parameters"></a><h4>Parameters</h4>
2833 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2835 <col width="150px" class="parameters_name">
2836 <col class="parameters_description">
2837 <col width="200px" class="parameters_annotations">
2841 <td class="parameter_name"><p>file</p></td>
2842 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2843 <td class="parameter_annotations"> </td>
2846 <td class="parameter_name"><p>res</p></td>
2847 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
2848 <td class="parameter_annotations"> </td>
2851 <td class="parameter_name"><p>error</p></td>
2852 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2853 <td class="parameter_annotations"> </td>
2858 <div class="refsect3">
2859 <a name="g-file-create-finish.returns"></a><h4>Returns</h4>
2860 <p> a <a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="type">GFileOutputStream</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
2861 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
2862 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2866 <div class="refsect2">
2867 <a name="g-file-replace-async"></a><h3>g_file_replace_async ()</h3>
2868 <pre class="programlisting"><span class="returnvalue">void</span>
2869 g_file_replace_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2870 <em class="parameter"><code>const <span class="type">char</span> *etag</code></em>,
2871 <em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> make_backup</code></em>,
2872 <em class="parameter"><code><a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a> flags</code></em>,
2873 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
2874 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2875 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
2876 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
2877 <p>Asynchronously overwrites the file, replacing the contents,
2878 possibly creating a backup copy of the file first.</p>
2879 <p>For more details, see <a class="link" href="GFile.html#g-file-replace" title="g_file_replace ()"><code class="function">g_file_replace()</code></a> which is
2880 the synchronous version of this call.</p>
2881 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
2883 You can then call <a class="link" href="GFile.html#g-file-replace-finish" title="g_file_replace_finish ()"><code class="function">g_file_replace_finish()</code></a> to get the result
2884 of the operation.</p>
2885 <div class="refsect3">
2886 <a name="g-file-replace-async.parameters"></a><h4>Parameters</h4>
2887 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2889 <col width="150px" class="parameters_name">
2890 <col class="parameters_description">
2891 <col width="200px" class="parameters_annotations">
2895 <td class="parameter_name"><p>file</p></td>
2896 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2897 <td class="parameter_annotations"> </td>
2900 <td class="parameter_name"><p>etag</p></td>
2901 <td class="parameter_description"><p> an <a class="link" href="GFile.html#gfile-etag" title="Entity Tags">entity tag</a> for the current <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>,
2902 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
2903 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
2906 <td class="parameter_name"><p>make_backup</p></td>
2907 <td class="parameter_description"><p><a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if a backup should be created</p></td>
2908 <td class="parameter_annotations"> </td>
2911 <td class="parameter_name"><p>flags</p></td>
2912 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a></p></td>
2913 <td class="parameter_annotations"> </td>
2916 <td class="parameter_name"><p>io_priority</p></td>
2917 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
2918 <td class="parameter_annotations"> </td>
2921 <td class="parameter_name"><p>cancellable</p></td>
2922 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
2923 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
2924 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
2927 <td class="parameter_name"><p>callback</p></td>
2928 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
2929 when the request is satisfied. </p></td>
2930 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
2933 <td class="parameter_name"><p>user_data</p></td>
2934 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
2935 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
2942 <div class="refsect2">
2943 <a name="g-file-replace-finish"></a><h3>g_file_replace_finish ()</h3>
2944 <pre class="programlisting"><a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="returnvalue">GFileOutputStream</span></a> *
2945 g_file_replace_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2946 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
2947 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2948 <p>Finishes an asynchronous file replace operation started with
2949 <a class="link" href="GFile.html#g-file-replace-async" title="g_file_replace_async ()"><code class="function">g_file_replace_async()</code></a>.</p>
2950 <div class="refsect3">
2951 <a name="g-file-replace-finish.parameters"></a><h4>Parameters</h4>
2952 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2954 <col width="150px" class="parameters_name">
2955 <col class="parameters_description">
2956 <col width="200px" class="parameters_annotations">
2960 <td class="parameter_name"><p>file</p></td>
2961 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
2962 <td class="parameter_annotations"> </td>
2965 <td class="parameter_name"><p>res</p></td>
2966 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
2967 <td class="parameter_annotations"> </td>
2970 <td class="parameter_name"><p>error</p></td>
2971 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2972 <td class="parameter_annotations"> </td>
2977 <div class="refsect3">
2978 <a name="g-file-replace-finish.returns"></a><h4>Returns</h4>
2979 <p> a <a class="link" href="GFileOutputStream.html" title="GFileOutputStream"><span class="type">GFileOutputStream</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
2980 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
2981 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2985 <div class="refsect2">
2986 <a name="g-file-query-info"></a><h3>g_file_query_info ()</h3>
2987 <pre class="programlisting"><a class="link" href="GFileInfo.html" title="GFileInfo"><span class="returnvalue">GFileInfo</span></a> *
2988 g_file_query_info (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
2989 <em class="parameter"><code>const <span class="type">char</span> *attributes</code></em>,
2990 <em class="parameter"><code><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> flags</code></em>,
2991 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2992 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2993 <p>Gets the requested information about specified <em class="parameter"><code>file</code></em>
2995 The result is a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> object that contains key-value
2996 attributes (such as the type or size of the file).</p>
2997 <p>The <em class="parameter"><code>attributes</code></em>
2998 value is a string that specifies the file
2999 attributes that should be gathered. It is not an error if
3000 it's not possible to read a particular requested attribute
3001 from a file - it just won't be set. <em class="parameter"><code>attributes</code></em>
3003 comma-separated list of attributes or attribute wildcards.
3004 The wildcard "*" means all attributes, and a wildcard like
3005 "standard::*" means all attributes in the standard namespace.
3006 An example attribute query be "standard::*,owner::user".
3007 The standard attributes are available as defines, like
3008 <a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-NAME:CAPS" title="G_FILE_ATTRIBUTE_STANDARD_NAME"><span class="type">G_FILE_ATTRIBUTE_STANDARD_NAME</span></a>.</p>
3009 <p>If <em class="parameter"><code>cancellable</code></em>
3010 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled
3011 by triggering the cancellable object from another thread. If the
3012 operation 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
3014 <p>For symlinks, normally the information about the target of the
3015 symlink is returned, rather than information about the symlink
3016 itself. However if you pass <a class="link" href="GFile.html#G-FILE-QUERY-INFO-NOFOLLOW-SYMLINKS:CAPS"><span class="type">G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS</span></a>
3017 in <em class="parameter"><code>flags</code></em>
3018 the information about the symlink itself will be returned.
3019 Also, for symlinks that point to non-existing files the information
3020 about the symlink itself will be returned.</p>
3021 <p>If the file does not exist, the <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-FOUND:CAPS"><code class="literal">G_IO_ERROR_NOT_FOUND</code></a> error will be
3022 returned. Other errors are possible too, and depend on what kind of
3023 filesystem the file is on.</p>
3024 <div class="refsect3">
3025 <a name="g-file-query-info.parameters"></a><h4>Parameters</h4>
3026 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3028 <col width="150px" class="parameters_name">
3029 <col class="parameters_description">
3030 <col width="200px" class="parameters_annotations">
3034 <td class="parameter_name"><p>file</p></td>
3035 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
3036 <td class="parameter_annotations"> </td>
3039 <td class="parameter_name"><p>attributes</p></td>
3040 <td class="parameter_description"><p>an attribute query string</p></td>
3041 <td class="parameter_annotations"> </td>
3044 <td class="parameter_name"><p>flags</p></td>
3045 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a></p></td>
3046 <td class="parameter_annotations"> </td>
3049 <td class="parameter_name"><p>cancellable</p></td>
3050 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
3051 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
3052 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3055 <td class="parameter_name"><p>error</p></td>
3056 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a></p></td>
3057 <td class="parameter_annotations"> </td>
3062 <div class="refsect3">
3063 <a name="g-file-query-info.returns"></a><h4>Returns</h4>
3064 <p> a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> for the given <em class="parameter"><code>file</code></em>
3065 , or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
3066 on error. Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
3067 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
3071 <div class="refsect2">
3072 <a name="g-file-query-info-async"></a><h3>g_file_query_info_async ()</h3>
3073 <pre class="programlisting"><span class="returnvalue">void</span>
3074 g_file_query_info_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3075 <em class="parameter"><code>const <span class="type">char</span> *attributes</code></em>,
3076 <em class="parameter"><code><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> flags</code></em>,
3077 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
3078 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
3079 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
3080 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
3081 <p>Asynchronously gets the requested information about specified <em class="parameter"><code>file</code></em>
3083 The result is a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> object that contains key-value attributes
3084 (such as type or size for the file).</p>
3085 <p>For more details, see <a class="link" href="GFile.html#g-file-query-info" title="g_file_query_info ()"><code class="function">g_file_query_info()</code></a> which is the synchronous
3086 version of this call.</p>
3087 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
3088 will be called. You can
3089 then call <a class="link" href="GFile.html#g-file-query-info-finish" title="g_file_query_info_finish ()"><code class="function">g_file_query_info_finish()</code></a> to get the result of the operation.</p>
3090 <div class="refsect3">
3091 <a name="g-file-query-info-async.parameters"></a><h4>Parameters</h4>
3092 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3094 <col width="150px" class="parameters_name">
3095 <col class="parameters_description">
3096 <col width="200px" class="parameters_annotations">
3100 <td class="parameter_name"><p>file</p></td>
3101 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
3102 <td class="parameter_annotations"> </td>
3105 <td class="parameter_name"><p>attributes</p></td>
3106 <td class="parameter_description"><p>an attribute query string</p></td>
3107 <td class="parameter_annotations"> </td>
3110 <td class="parameter_name"><p>flags</p></td>
3111 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a></p></td>
3112 <td class="parameter_annotations"> </td>
3115 <td class="parameter_name"><p>io_priority</p></td>
3116 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
3117 <td class="parameter_annotations"> </td>
3120 <td class="parameter_name"><p>cancellable</p></td>
3121 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
3122 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
3123 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3126 <td class="parameter_name"><p>callback</p></td>
3127 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the
3128 request is satisfied. </p></td>
3129 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
3132 <td class="parameter_name"><p>user_data</p></td>
3133 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
3134 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
3141 <div class="refsect2">
3142 <a name="g-file-query-info-finish"></a><h3>g_file_query_info_finish ()</h3>
3143 <pre class="programlisting"><a class="link" href="GFileInfo.html" title="GFileInfo"><span class="returnvalue">GFileInfo</span></a> *
3144 g_file_query_info_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3145 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
3146 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
3147 <p>Finishes an asynchronous file info query.
3148 See <a class="link" href="GFile.html#g-file-query-info-async" title="g_file_query_info_async ()"><code class="function">g_file_query_info_async()</code></a>.</p>
3149 <div class="refsect3">
3150 <a name="g-file-query-info-finish.parameters"></a><h4>Parameters</h4>
3151 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3153 <col width="150px" class="parameters_name">
3154 <col class="parameters_description">
3155 <col width="200px" class="parameters_annotations">
3159 <td class="parameter_name"><p>file</p></td>
3160 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
3161 <td class="parameter_annotations"> </td>
3164 <td class="parameter_name"><p>res</p></td>
3165 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
3166 <td class="parameter_annotations"> </td>
3169 <td class="parameter_name"><p>error</p></td>
3170 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a></p></td>
3171 <td class="parameter_annotations"> </td>
3176 <div class="refsect3">
3177 <a name="g-file-query-info-finish.returns"></a><h4>Returns</h4>
3178 <p> <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> for given <em class="parameter"><code>file</code></em>
3179 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. Free the returned object with
3180 <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
3181 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
3185 <div class="refsect2">
3186 <a name="g-file-query-exists"></a><h3>g_file_query_exists ()</h3>
3187 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
3188 g_file_query_exists (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3189 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>);</pre>
3190 <p>Utility function to check if a particular file exists. This is
3191 implemented using <a class="link" href="GFile.html#g-file-query-info" title="g_file_query_info ()"><code class="function">g_file_query_info()</code></a> and as such does blocking I/O.</p>
3192 <p>Note that in many cases it is racy to first check for file existence
3193 and then execute something based on the outcome of that, because the
3194 file might have been created or removed in between the operations. The
3195 general approach to handling that is to not check, but just do the
3196 operation and handle the errors as they come.</p>
3197 <p>As an example of race-free checking, take the case of reading a file,
3198 and if it doesn't exist, creating it. There are two racy versions: read
3199 it, and on error create it; and: check if it exists, if not create it.
3200 These can both result in two processes creating the file (with perhaps
3201 a partially written file as the result). The correct approach is to
3202 always try to create the file with <a class="link" href="GFile.html#g-file-create" title="g_file_create ()"><code class="function">g_file_create()</code></a> which will either
3203 atomically create the file or fail with a <a class="link" href="gio-GIOError.html#G-IO-ERROR-EXISTS:CAPS"><code class="literal">G_IO_ERROR_EXISTS</code></a> error.</p>
3204 <p>However, in many cases an existence check is useful in a user interface,
3205 for instance to make a menu item sensitive/insensitive, so that you don't
3206 have to fool users that something is possible and then just show an error
3207 dialog. If you do this, you should make sure to also handle the errors
3208 that can happen due to races when you execute the operation.</p>
3209 <div class="refsect3">
3210 <a name="g-file-query-exists.parameters"></a><h4>Parameters</h4>
3211 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3213 <col width="150px" class="parameters_name">
3214 <col class="parameters_description">
3215 <col width="200px" class="parameters_annotations">
3219 <td class="parameter_name"><p>file</p></td>
3220 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
3221 <td class="parameter_annotations"> </td>
3224 <td class="parameter_name"><p>cancellable</p></td>
3225 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
3226 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
3227 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3232 <div class="refsect3">
3233 <a name="g-file-query-exists.returns"></a><h4>Returns</h4>
3234 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file exists (and can be detected without error),
3235 <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise (or if cancelled).</p>
3239 <div class="refsect2">
3240 <a name="g-file-query-file-type"></a><h3>g_file_query_file_type ()</h3>
3241 <pre class="programlisting"><a class="link" href="GFileInfo.html#GFileType" title="enum GFileType"><span class="returnvalue">GFileType</span></a>
3242 g_file_query_file_type (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3243 <em class="parameter"><code><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> flags</code></em>,
3244 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>);</pre>
3245 <p>Utility function to inspect the <a class="link" href="GFileInfo.html#GFileType" title="enum GFileType"><span class="type">GFileType</span></a> of a file. This is
3246 implemented using <a class="link" href="GFile.html#g-file-query-info" title="g_file_query_info ()"><code class="function">g_file_query_info()</code></a> and as such does blocking I/O.</p>
3247 <p>The primary use case of this method is to check if a file is
3248 a regular file, directory, or symlink.</p>
3249 <div class="refsect3">
3250 <a name="g-file-query-file-type.parameters"></a><h4>Parameters</h4>
3251 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3253 <col width="150px" class="parameters_name">
3254 <col class="parameters_description">
3255 <col width="200px" class="parameters_annotations">
3259 <td class="parameter_name"><p>file</p></td>
3260 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
3261 <td class="parameter_annotations"> </td>
3264 <td class="parameter_name"><p>flags</p></td>
3265 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> passed to <a class="link" href="GFile.html#g-file-query-info" title="g_file_query_info ()"><code class="function">g_file_query_info()</code></a></p></td>
3266 <td class="parameter_annotations"> </td>
3269 <td class="parameter_name"><p>cancellable</p></td>
3270 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
3271 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
3272 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3277 <div class="refsect3">
3278 <a name="g-file-query-file-type.returns"></a><h4>Returns</h4>
3279 <p> The <a class="link" href="GFileInfo.html#GFileType" title="enum GFileType"><span class="type">GFileType</span></a> of the file and <a class="link" href="GFileInfo.html#G-FILE-TYPE-UNKNOWN:CAPS"><span class="type">G_FILE_TYPE_UNKNOWN</span></a>
3280 if the file does not exist</p>
3282 <p class="since">Since: <a class="link" href="api-index-2-18.html#api-index-2.18">2.18</a></p>
3285 <div class="refsect2">
3286 <a name="g-file-query-filesystem-info"></a><h3>g_file_query_filesystem_info ()</h3>
3287 <pre class="programlisting"><a class="link" href="GFileInfo.html" title="GFileInfo"><span class="returnvalue">GFileInfo</span></a> *
3288 g_file_query_filesystem_info (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3289 <em class="parameter"><code>const <span class="type">char</span> *attributes</code></em>,
3290 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
3291 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
3292 <p>Similar to <a class="link" href="GFile.html#g-file-query-info" title="g_file_query_info ()"><code class="function">g_file_query_info()</code></a>, but obtains information
3293 about the filesystem the <em class="parameter"><code>file</code></em>
3294 is on, rather than the file itself.
3295 For instance the amount of space available and the type of
3297 <p>The <em class="parameter"><code>attributes</code></em>
3298 value is a string that specifies the attributes
3299 that should be gathered. It is not an error if it's not possible
3300 to read a particular requested attribute from a file - it just
3301 won't be set. <em class="parameter"><code>attributes</code></em>
3302 should be a comma-separated list of
3303 attributes or attribute wildcards. The wildcard "*" means all
3304 attributes, and a wildcard like "filesystem::*" means all attributes
3305 in the filesystem namespace. The standard namespace for filesystem
3306 attributes is "filesystem". Common attributes of interest are
3307 <a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-FILESYSTEM-SIZE:CAPS" title="G_FILE_ATTRIBUTE_FILESYSTEM_SIZE"><span class="type">G_FILE_ATTRIBUTE_FILESYSTEM_SIZE</span></a> (the total size of the filesystem
3308 in bytes), <a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-FILESYSTEM-FREE:CAPS" title="G_FILE_ATTRIBUTE_FILESYSTEM_FREE"><span class="type">G_FILE_ATTRIBUTE_FILESYSTEM_FREE</span></a> (number of bytes available),
3309 and <a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-FILESYSTEM-TYPE:CAPS" title="G_FILE_ATTRIBUTE_FILESYSTEM_TYPE"><span class="type">G_FILE_ATTRIBUTE_FILESYSTEM_TYPE</span></a> (type of the filesystem).</p>
3310 <p>If <em class="parameter"><code>cancellable</code></em>
3311 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled
3312 by triggering the cancellable object from another thread. If the
3313 operation 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
3315 <p>If the file does not exist, the <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-FOUND:CAPS"><code class="literal">G_IO_ERROR_NOT_FOUND</code></a> error will
3316 be returned. Other errors are possible too, and depend on what
3317 kind of filesystem the file is on.</p>
3318 <div class="refsect3">
3319 <a name="g-file-query-filesystem-info.parameters"></a><h4>Parameters</h4>
3320 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3322 <col width="150px" class="parameters_name">
3323 <col class="parameters_description">
3324 <col width="200px" class="parameters_annotations">
3328 <td class="parameter_name"><p>file</p></td>
3329 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
3330 <td class="parameter_annotations"> </td>
3333 <td class="parameter_name"><p>attributes</p></td>
3334 <td class="parameter_description"><p>an attribute query string</p></td>
3335 <td class="parameter_annotations"> </td>
3338 <td class="parameter_name"><p>cancellable</p></td>
3339 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
3340 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
3341 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3344 <td class="parameter_name"><p>error</p></td>
3345 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a></p></td>
3346 <td class="parameter_annotations"> </td>
3351 <div class="refsect3">
3352 <a name="g-file-query-filesystem-info.returns"></a><h4>Returns</h4>
3353 <p> a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there was an error.
3354 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
3355 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
3359 <div class="refsect2">
3360 <a name="g-file-query-filesystem-info-async"></a><h3>g_file_query_filesystem_info_async ()</h3>
3361 <pre class="programlisting"><span class="returnvalue">void</span>
3362 g_file_query_filesystem_info_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3363 <em class="parameter"><code>const <span class="type">char</span> *attributes</code></em>,
3364 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
3365 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
3366 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
3367 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
3368 <p>Asynchronously gets the requested information about the filesystem
3369 that the specified <em class="parameter"><code>file</code></em>
3370 is on. The result is a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> object
3371 that contains key-value attributes (such as type or size for the
3373 <p>For more details, see <a class="link" href="GFile.html#g-file-query-filesystem-info" title="g_file_query_filesystem_info ()"><code class="function">g_file_query_filesystem_info()</code></a> which is the
3374 synchronous version of this call.</p>
3375 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
3376 will be called. You can
3377 then call <a class="link" href="GFile.html#g-file-query-info-finish" title="g_file_query_info_finish ()"><code class="function">g_file_query_info_finish()</code></a> to get the result of the
3379 <div class="refsect3">
3380 <a name="g-file-query-filesystem-info-async.parameters"></a><h4>Parameters</h4>
3381 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3383 <col width="150px" class="parameters_name">
3384 <col class="parameters_description">
3385 <col width="200px" class="parameters_annotations">
3389 <td class="parameter_name"><p>file</p></td>
3390 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
3391 <td class="parameter_annotations"> </td>
3394 <td class="parameter_name"><p>attributes</p></td>
3395 <td class="parameter_description"><p>an attribute query string</p></td>
3396 <td class="parameter_annotations"> </td>
3399 <td class="parameter_name"><p>io_priority</p></td>
3400 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
3401 <td class="parameter_annotations"> </td>
3404 <td class="parameter_name"><p>cancellable</p></td>
3405 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
3406 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
3407 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3410 <td class="parameter_name"><p>callback</p></td>
3411 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
3412 when the request is satisfied. </p></td>
3413 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
3416 <td class="parameter_name"><p>user_data</p></td>
3417 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
3418 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
3425 <div class="refsect2">
3426 <a name="g-file-query-filesystem-info-finish"></a><h3>g_file_query_filesystem_info_finish ()</h3>
3427 <pre class="programlisting"><a class="link" href="GFileInfo.html" title="GFileInfo"><span class="returnvalue">GFileInfo</span></a> *
3428 g_file_query_filesystem_info_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3429 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
3430 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
3431 <p>Finishes an asynchronous filesystem info query.
3432 See <a class="link" href="GFile.html#g-file-query-filesystem-info-async" title="g_file_query_filesystem_info_async ()"><code class="function">g_file_query_filesystem_info_async()</code></a>.</p>
3433 <div class="refsect3">
3434 <a name="g-file-query-filesystem-info-finish.parameters"></a><h4>Parameters</h4>
3435 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3437 <col width="150px" class="parameters_name">
3438 <col class="parameters_description">
3439 <col width="200px" class="parameters_annotations">
3443 <td class="parameter_name"><p>file</p></td>
3444 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
3445 <td class="parameter_annotations"> </td>
3448 <td class="parameter_name"><p>res</p></td>
3449 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
3450 <td class="parameter_annotations"> </td>
3453 <td class="parameter_name"><p>error</p></td>
3454 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a></p></td>
3455 <td class="parameter_annotations"> </td>
3460 <div class="refsect3">
3461 <a name="g-file-query-filesystem-info-finish.returns"></a><h4>Returns</h4>
3462 <p> <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> for given <em class="parameter"><code>file</code></em>
3463 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
3464 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
3465 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
3469 <div class="refsect2">
3470 <a name="g-file-query-default-handler"></a><h3>g_file_query_default_handler ()</h3>
3471 <pre class="programlisting"><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="returnvalue">GAppInfo</span></a> *
3472 g_file_query_default_handler (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3473 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
3474 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
3475 <p>Returns the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> that is registered as the default
3476 application to handle the file specified by <em class="parameter"><code>file</code></em>
3478 <p>If <em class="parameter"><code>cancellable</code></em>
3479 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
3480 triggering the cancellable object from another thread. If the operation
3481 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 returned.</p>
3482 <div class="refsect3">
3483 <a name="g-file-query-default-handler.parameters"></a><h4>Parameters</h4>
3484 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3486 <col width="150px" class="parameters_name">
3487 <col class="parameters_description">
3488 <col width="200px" class="parameters_annotations">
3492 <td class="parameter_name"><p>file</p></td>
3493 <td class="parameter_description"><p>a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> to open</p></td>
3494 <td class="parameter_annotations"> </td>
3497 <td class="parameter_name"><p>cancellable</p></td>
3498 <td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore</p></td>
3499 <td class="parameter_annotations"> </td>
3502 <td class="parameter_name"><p>error</p></td>
3503 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
3504 <td class="parameter_annotations"> </td>
3509 <div class="refsect3">
3510 <a name="g-file-query-default-handler.returns"></a><h4>Returns</h4>
3511 <p> a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> if the handle was found,
3512 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there were errors.
3513 When you are done with it, release it with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
3514 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
3518 <div class="refsect2">
3519 <a name="g-file-measure-disk-usage"></a><h3>g_file_measure_disk_usage ()</h3>
3520 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
3521 g_file_measure_disk_usage (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3522 <em class="parameter"><code><a class="link" href="GFile.html#GFileMeasureFlags" title="enum GFileMeasureFlags"><span class="type">GFileMeasureFlags</span></a> flags</code></em>,
3523 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
3524 <em class="parameter"><code><a class="link" href="GFile.html#GFileMeasureProgressCallback" title="GFileMeasureProgressCallback ()"><span class="type">GFileMeasureProgressCallback</span></a> progress_callback</code></em>,
3525 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> progress_data</code></em>,
3526 <em class="parameter"><code><a href="../glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> *disk_usage</code></em>,
3527 <em class="parameter"><code><a href="../glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> *num_dirs</code></em>,
3528 <em class="parameter"><code><a href="../glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> *num_files</code></em>,
3529 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
3530 <p>Recursively measures the disk usage of <em class="parameter"><code>file</code></em>
3532 <p>This is essentially an analog of the 'du' command, but it also
3533 reports the number of directories and non-directory files encountered
3534 (including things like symbolic links).</p>
3535 <p>By default, errors are only reported against the toplevel file
3536 itself. Errors found while recursing are silently ignored, unless
3537 <code class="literal">G_FILE_DISK_USAGE_REPORT_ALL_ERRORS</code> is given in <em class="parameter"><code>flags</code></em>
3539 <p>The returned size, <em class="parameter"><code>disk_usage</code></em>
3540 , is in bytes and should be formatted
3541 with <a href="../glib-Miscellaneous-Utility-Functions.html#g-format-size"><code class="function">g_format_size()</code></a> in order to get something reasonable for showing
3542 in a user interface.</p>
3543 <p><em class="parameter"><code>progress_callback</code></em>
3544 and <em class="parameter"><code>progress_data</code></em>
3545 can be given to request
3546 periodic progress updates while scanning. See the documentation for
3547 <a class="link" href="GFile.html#GFileMeasureProgressCallback" title="GFileMeasureProgressCallback ()"><span class="type">GFileMeasureProgressCallback</span></a> for information about when and how the
3548 callback will be invoked.</p>
3549 <div class="refsect3">
3550 <a name="g-file-measure-disk-usage.parameters"></a><h4>Parameters</h4>
3551 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3553 <col width="150px" class="parameters_name">
3554 <col class="parameters_description">
3555 <col width="200px" class="parameters_annotations">
3559 <td class="parameter_name"><p>file</p></td>
3560 <td class="parameter_description"><p>a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
3561 <td class="parameter_annotations"> </td>
3564 <td class="parameter_name"><p>flags</p></td>
3565 <td class="parameter_description"><p><a class="link" href="GFile.html#GFileMeasureFlags" title="enum GFileMeasureFlags"><span class="type">GFileMeasureFlags</span></a></p></td>
3566 <td class="parameter_annotations"> </td>
3569 <td class="parameter_name"><p>cancellable</p></td>
3570 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>. </p></td>
3571 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3574 <td class="parameter_name"><p>progress_callback</p></td>
3575 <td class="parameter_description"><p> a <a class="link" href="GFile.html#GFileMeasureProgressCallback" title="GFileMeasureProgressCallback ()"><span class="type">GFileMeasureProgressCallback</span></a>. </p></td>
3576 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3579 <td class="parameter_name"><p>progress_data</p></td>
3580 <td class="parameter_description"><p>user_data for <em class="parameter"><code>progress_callback</code></em>
3582 <td class="parameter_annotations"> </td>
3585 <td class="parameter_name"><p>disk_usage</p></td>
3586 <td class="parameter_description"><p> the number of bytes of disk space used. </p></td>
3587 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
3590 <td class="parameter_name"><p>num_dirs</p></td>
3591 <td class="parameter_description"><p> the number of directories encountered. </p></td>
3592 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
3595 <td class="parameter_name"><p>num_files</p></td>
3596 <td class="parameter_description"><p> the number of non-directories encountered. </p></td>
3597 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
3600 <td class="parameter_name"><p>error</p></td>
3601 <td class="parameter_description"><p> <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, or a pointer to a <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> pointer. </p></td>
3602 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3607 <div class="refsect3">
3608 <a name="g-file-measure-disk-usage.returns"></a><h4>Returns</h4>
3609 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if successful, with the out parameters set.
3610 <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise, with <em class="parameter"><code>error</code></em>
3613 <p class="since">Since: <a class="link" href="api-index-2-38.html#api-index-2.38">2.38</a></p>
3616 <div class="refsect2">
3617 <a name="g-file-measure-disk-usage-async"></a><h3>g_file_measure_disk_usage_async ()</h3>
3618 <pre class="programlisting"><span class="returnvalue">void</span>
3619 g_file_measure_disk_usage_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3620 <em class="parameter"><code><a class="link" href="GFile.html#GFileMeasureFlags" title="enum GFileMeasureFlags"><span class="type">GFileMeasureFlags</span></a> flags</code></em>,
3621 <em class="parameter"><code><a href="../glib-Basic-Types.html#gint"><span class="type">gint</span></a> io_priority</code></em>,
3622 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
3623 <em class="parameter"><code><a class="link" href="GFile.html#GFileMeasureProgressCallback" title="GFileMeasureProgressCallback ()"><span class="type">GFileMeasureProgressCallback</span></a> progress_callback</code></em>,
3624 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> progress_data</code></em>,
3625 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
3626 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
3627 <p>Recursively measures the disk usage of <em class="parameter"><code>file</code></em>
3629 <p>This is the asynchronous version of <a class="link" href="GFile.html#g-file-measure-disk-usage" title="g_file_measure_disk_usage ()"><code class="function">g_file_measure_disk_usage()</code></a>. See
3630 there for more information.</p>
3631 <div class="refsect3">
3632 <a name="g-file-measure-disk-usage-async.parameters"></a><h4>Parameters</h4>
3633 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3635 <col width="150px" class="parameters_name">
3636 <col class="parameters_description">
3637 <col width="200px" class="parameters_annotations">
3641 <td class="parameter_name"><p>file</p></td>
3642 <td class="parameter_description"><p>a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
3643 <td class="parameter_annotations"> </td>
3646 <td class="parameter_name"><p>flags</p></td>
3647 <td class="parameter_description"><p><a class="link" href="GFile.html#GFileMeasureFlags" title="enum GFileMeasureFlags"><span class="type">GFileMeasureFlags</span></a></p></td>
3648 <td class="parameter_annotations"> </td>
3651 <td class="parameter_name"><p>io_priority</p></td>
3652 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
3653 <td class="parameter_annotations"> </td>
3656 <td class="parameter_name"><p>cancellable</p></td>
3657 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>. </p></td>
3658 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3661 <td class="parameter_name"><p>progress_callback</p></td>
3662 <td class="parameter_description"><p> a <a class="link" href="GFile.html#GFileMeasureProgressCallback" title="GFileMeasureProgressCallback ()"><span class="type">GFileMeasureProgressCallback</span></a>. </p></td>
3663 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3666 <td class="parameter_name"><p>progress_data</p></td>
3667 <td class="parameter_description"><p>user_data for <em class="parameter"><code>progress_callback</code></em>
3669 <td class="parameter_annotations"> </td>
3672 <td class="parameter_name"><p>callback</p></td>
3673 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when complete. </p></td>
3674 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3677 <td class="parameter_name"><p>user_data</p></td>
3678 <td class="parameter_description"><p>the data to pass to callback function</p></td>
3679 <td class="parameter_annotations"> </td>
3684 <p class="since">Since: <a class="link" href="api-index-2-38.html#api-index-2.38">2.38</a></p>
3687 <div class="refsect2">
3688 <a name="g-file-measure-disk-usage-finish"></a><h3>g_file_measure_disk_usage_finish ()</h3>
3689 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
3690 g_file_measure_disk_usage_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3691 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
3692 <em class="parameter"><code><a href="../glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> *disk_usage</code></em>,
3693 <em class="parameter"><code><a href="../glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> *num_dirs</code></em>,
3694 <em class="parameter"><code><a href="../glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> *num_files</code></em>,
3695 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
3696 <p>Collects the results from an earlier call to
3697 <a class="link" href="GFile.html#g-file-measure-disk-usage-async" title="g_file_measure_disk_usage_async ()"><code class="function">g_file_measure_disk_usage_async()</code></a>. See <a class="link" href="GFile.html#g-file-measure-disk-usage" title="g_file_measure_disk_usage ()"><code class="function">g_file_measure_disk_usage()</code></a> for
3698 more information.</p>
3699 <div class="refsect3">
3700 <a name="g-file-measure-disk-usage-finish.parameters"></a><h4>Parameters</h4>
3701 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3703 <col width="150px" class="parameters_name">
3704 <col class="parameters_description">
3705 <col width="200px" class="parameters_annotations">
3709 <td class="parameter_name"><p>file</p></td>
3710 <td class="parameter_description"><p>a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
3711 <td class="parameter_annotations"> </td>
3714 <td class="parameter_name"><p>result</p></td>
3715 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> passed to your <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a></p></td>
3716 <td class="parameter_annotations"> </td>
3719 <td class="parameter_name"><p>disk_usage</p></td>
3720 <td class="parameter_description"><p> the number of bytes of disk space used. </p></td>
3721 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
3724 <td class="parameter_name"><p>num_dirs</p></td>
3725 <td class="parameter_description"><p> the number of directories encountered. </p></td>
3726 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
3729 <td class="parameter_name"><p>num_files</p></td>
3730 <td class="parameter_description"><p> the number of non-directories encountered. </p></td>
3731 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
3734 <td class="parameter_name"><p>error</p></td>
3735 <td class="parameter_description"><p> <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, or a pointer to a <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> pointer. </p></td>
3736 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3741 <div class="refsect3">
3742 <a name="g-file-measure-disk-usage-finish.returns"></a><h4>Returns</h4>
3743 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if successful, with the out parameters set.
3744 <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise, with <em class="parameter"><code>error</code></em>
3747 <p class="since">Since: <a class="link" href="api-index-2-38.html#api-index-2.38">2.38</a></p>
3750 <div class="refsect2">
3751 <a name="g-file-find-enclosing-mount"></a><h3>g_file_find_enclosing_mount ()</h3>
3752 <pre class="programlisting"><a class="link" href="GMount.html" title="GMount"><span class="returnvalue">GMount</span></a> *
3753 g_file_find_enclosing_mount (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3754 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
3755 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
3756 <p>Gets a <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> for the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p>
3757 <p>If the <a class="link" href="GFile.html#GFileIface" title="struct GFileIface"><span class="type">GFileIface</span></a> for <em class="parameter"><code>file</code></em>
3758 does not have a mount (e.g.
3759 possibly a remote share), <em class="parameter"><code>error</code></em>
3760 will be set to <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-FOUND:CAPS"><code class="literal">G_IO_ERROR_NOT_FOUND</code></a>
3761 and <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will be returned.</p>
3762 <p>If <em class="parameter"><code>cancellable</code></em>
3763 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
3764 triggering the cancellable object from another thread. If the operation
3765 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 returned.</p>
3766 <div class="refsect3">
3767 <a name="g-file-find-enclosing-mount.parameters"></a><h4>Parameters</h4>
3768 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3770 <col width="150px" class="parameters_name">
3771 <col class="parameters_description">
3772 <col width="200px" class="parameters_annotations">
3776 <td class="parameter_name"><p>file</p></td>
3777 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
3778 <td class="parameter_annotations"> </td>
3781 <td class="parameter_name"><p>cancellable</p></td>
3782 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
3783 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
3784 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3787 <td class="parameter_name"><p>error</p></td>
3788 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a></p></td>
3789 <td class="parameter_annotations"> </td>
3794 <div class="refsect3">
3795 <a name="g-file-find-enclosing-mount.returns"></a><h4>Returns</h4>
3796 <p> a <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> where the <em class="parameter"><code>file</code></em>
3798 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
3799 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
3800 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
3804 <div class="refsect2">
3805 <a name="g-file-find-enclosing-mount-async"></a><h3>g_file_find_enclosing_mount_async ()</h3>
3806 <pre class="programlisting"><span class="returnvalue">void</span>
3807 g_file_find_enclosing_mount_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3808 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
3809 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
3810 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
3811 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
3812 <p>Asynchronously gets the mount for the file.</p>
3813 <p>For more details, see <a class="link" href="GFile.html#g-file-find-enclosing-mount" title="g_file_find_enclosing_mount ()"><code class="function">g_file_find_enclosing_mount()</code></a> which is
3814 the synchronous version of this call.</p>
3815 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
3817 You can then call <a class="link" href="GFile.html#g-file-find-enclosing-mount-finish" title="g_file_find_enclosing_mount_finish ()"><code class="function">g_file_find_enclosing_mount_finish()</code></a> to
3818 get the result of the operation.</p>
3819 <div class="refsect3">
3820 <a name="g-file-find-enclosing-mount-async.parameters"></a><h4>Parameters</h4>
3821 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3823 <col width="150px" class="parameters_name">
3824 <col class="parameters_description">
3825 <col width="200px" class="parameters_annotations">
3829 <td class="parameter_name"><p>file</p></td>
3830 <td class="parameter_description"><p>a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
3831 <td class="parameter_annotations"> </td>
3834 <td class="parameter_name"><p>io_priority</p></td>
3835 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
3836 <td class="parameter_annotations"> </td>
3839 <td class="parameter_name"><p>cancellable</p></td>
3840 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
3841 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
3842 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3845 <td class="parameter_name"><p>callback</p></td>
3846 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
3847 when the request is satisfied. </p></td>
3848 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
3851 <td class="parameter_name"><p>user_data</p></td>
3852 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
3853 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
3860 <div class="refsect2">
3861 <a name="g-file-find-enclosing-mount-finish"></a><h3>g_file_find_enclosing_mount_finish ()</h3>
3862 <pre class="programlisting"><a class="link" href="GMount.html" title="GMount"><span class="returnvalue">GMount</span></a> *
3863 g_file_find_enclosing_mount_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3864 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
3865 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
3866 <p>Finishes an asynchronous find mount request.
3867 See <a class="link" href="GFile.html#g-file-find-enclosing-mount-async" title="g_file_find_enclosing_mount_async ()"><code class="function">g_file_find_enclosing_mount_async()</code></a>.</p>
3868 <div class="refsect3">
3869 <a name="g-file-find-enclosing-mount-finish.parameters"></a><h4>Parameters</h4>
3870 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3872 <col width="150px" class="parameters_name">
3873 <col class="parameters_description">
3874 <col width="200px" class="parameters_annotations">
3878 <td class="parameter_name"><p>file</p></td>
3879 <td class="parameter_description"><p>a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
3880 <td class="parameter_annotations"> </td>
3883 <td class="parameter_name"><p>res</p></td>
3884 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
3885 <td class="parameter_annotations"> </td>
3888 <td class="parameter_name"><p>error</p></td>
3889 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a></p></td>
3890 <td class="parameter_annotations"> </td>
3895 <div class="refsect3">
3896 <a name="g-file-find-enclosing-mount-finish.returns"></a><h4>Returns</h4>
3897 <p> <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> for given <em class="parameter"><code>file</code></em>
3898 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
3899 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
3900 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
3904 <div class="refsect2">
3905 <a name="g-file-enumerate-children"></a><h3>g_file_enumerate_children ()</h3>
3906 <pre class="programlisting"><a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="returnvalue">GFileEnumerator</span></a> *
3907 g_file_enumerate_children (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3908 <em class="parameter"><code>const <span class="type">char</span> *attributes</code></em>,
3909 <em class="parameter"><code><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> flags</code></em>,
3910 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
3911 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
3912 <p>Gets the requested information about the files in a directory.
3913 The result is a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> object that will give out
3914 <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> objects for all the files in the directory.</p>
3915 <p>The <em class="parameter"><code>attributes</code></em>
3916 value is a string that specifies the file
3917 attributes that should be gathered. It is not an error if
3918 it's not possible to read a particular requested attribute
3919 from a file - it just won't be set. <em class="parameter"><code>attributes</code></em>
3921 be a comma-separated list of attributes or attribute wildcards.
3922 The wildcard "*" means all attributes, and a wildcard like
3923 "standard::*" means all attributes in the standard namespace.
3924 An example attribute query be "standard::*,owner::user".
3925 The standard attributes are available as defines, like
3926 <a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-NAME:CAPS" title="G_FILE_ATTRIBUTE_STANDARD_NAME"><span class="type">G_FILE_ATTRIBUTE_STANDARD_NAME</span></a>.</p>
3927 <p>If <em class="parameter"><code>cancellable</code></em>
3928 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled
3929 by triggering the cancellable object from another thread. If the
3930 operation 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
3932 <p>If the file does not exist, the <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-FOUND:CAPS"><code class="literal">G_IO_ERROR_NOT_FOUND</code></a> error will
3933 be returned. If the file is not a directory, the <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-DIRECTORY:CAPS"><code class="literal">G_IO_ERROR_NOT_DIRECTORY</code></a>
3934 error will be returned. Other errors are possible too.</p>
3935 <div class="refsect3">
3936 <a name="g-file-enumerate-children.parameters"></a><h4>Parameters</h4>
3937 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3939 <col width="150px" class="parameters_name">
3940 <col class="parameters_description">
3941 <col width="200px" class="parameters_annotations">
3945 <td class="parameter_name"><p>file</p></td>
3946 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
3947 <td class="parameter_annotations"> </td>
3950 <td class="parameter_name"><p>attributes</p></td>
3951 <td class="parameter_description"><p>an attribute query string</p></td>
3952 <td class="parameter_annotations"> </td>
3955 <td class="parameter_name"><p>flags</p></td>
3956 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a></p></td>
3957 <td class="parameter_annotations"> </td>
3960 <td class="parameter_name"><p>cancellable</p></td>
3961 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
3962 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
3963 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3966 <td class="parameter_name"><p>error</p></td>
3967 <td class="parameter_description"><p><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting</p></td>
3968 <td class="parameter_annotations"> </td>
3973 <div class="refsect3">
3974 <a name="g-file-enumerate-children.returns"></a><h4>Returns</h4>
3975 <p> A <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> if successful,
3976 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
3977 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
3981 <div class="refsect2">
3982 <a name="g-file-enumerate-children-async"></a><h3>g_file_enumerate_children_async ()</h3>
3983 <pre class="programlisting"><span class="returnvalue">void</span>
3984 g_file_enumerate_children_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
3985 <em class="parameter"><code>const <span class="type">char</span> *attributes</code></em>,
3986 <em class="parameter"><code><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> flags</code></em>,
3987 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
3988 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
3989 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
3990 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
3991 <p>Asynchronously gets the requested information about the files
3992 in a directory. The result is a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> object that will
3993 give out <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> objects for all the files in the directory.</p>
3994 <p>For more details, see <a class="link" href="GFile.html#g-file-enumerate-children" title="g_file_enumerate_children ()"><code class="function">g_file_enumerate_children()</code></a> which is
3995 the synchronous version of this call.</p>
3996 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
3997 will be called. You can
3998 then call <a class="link" href="GFile.html#g-file-enumerate-children-finish" title="g_file_enumerate_children_finish ()"><code class="function">g_file_enumerate_children_finish()</code></a> to get the result of
4000 <div class="refsect3">
4001 <a name="g-file-enumerate-children-async.parameters"></a><h4>Parameters</h4>
4002 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4004 <col width="150px" class="parameters_name">
4005 <col class="parameters_description">
4006 <col width="200px" class="parameters_annotations">
4010 <td class="parameter_name"><p>file</p></td>
4011 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4012 <td class="parameter_annotations"> </td>
4015 <td class="parameter_name"><p>attributes</p></td>
4016 <td class="parameter_description"><p>an attribute query string</p></td>
4017 <td class="parameter_annotations"> </td>
4020 <td class="parameter_name"><p>flags</p></td>
4021 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a></p></td>
4022 <td class="parameter_annotations"> </td>
4025 <td class="parameter_name"><p>io_priority</p></td>
4026 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
4027 <td class="parameter_annotations"> </td>
4030 <td class="parameter_name"><p>cancellable</p></td>
4031 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
4032 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
4033 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
4036 <td class="parameter_name"><p>callback</p></td>
4037 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the
4038 request is satisfied. </p></td>
4039 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
4042 <td class="parameter_name"><p>user_data</p></td>
4043 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
4044 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
4051 <div class="refsect2">
4052 <a name="g-file-enumerate-children-finish"></a><h3>g_file_enumerate_children_finish ()</h3>
4053 <pre class="programlisting"><a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="returnvalue">GFileEnumerator</span></a> *
4054 g_file_enumerate_children_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
4055 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
4056 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
4057 <p>Finishes an async enumerate children operation.
4058 See <a class="link" href="GFile.html#g-file-enumerate-children-async" title="g_file_enumerate_children_async ()"><code class="function">g_file_enumerate_children_async()</code></a>.</p>
4059 <div class="refsect3">
4060 <a name="g-file-enumerate-children-finish.parameters"></a><h4>Parameters</h4>
4061 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4063 <col width="150px" class="parameters_name">
4064 <col class="parameters_description">
4065 <col width="200px" class="parameters_annotations">
4069 <td class="parameter_name"><p>file</p></td>
4070 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4071 <td class="parameter_annotations"> </td>
4074 <td class="parameter_name"><p>res</p></td>
4075 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
4076 <td class="parameter_annotations"> </td>
4079 <td class="parameter_name"><p>error</p></td>
4080 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a></p></td>
4081 <td class="parameter_annotations"> </td>
4086 <div class="refsect3">
4087 <a name="g-file-enumerate-children-finish.returns"></a><h4>Returns</h4>
4088 <p> a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
4089 if an error occurred.
4090 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
4091 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
4095 <div class="refsect2">
4096 <a name="g-file-set-display-name"></a><h3>g_file_set_display_name ()</h3>
4097 <pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
4098 g_file_set_display_name (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
4099 <em class="parameter"><code>const <span class="type">char</span> *display_name</code></em>,
4100 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
4101 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
4102 <p>Renames <em class="parameter"><code>file</code></em>
4103 to the specified display name.</p>
4104 <p>The display name is converted from UTF-8 to the correct encoding
4105 for the target filesystem if possible and the <em class="parameter"><code>file</code></em>
4106 is renamed to this.</p>
4107 <p>If you want to implement a rename operation in the user interface the
4108 edit name (<a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-EDIT-NAME:CAPS" title="G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME"><span class="type">G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME</span></a>) should be used as the
4109 initial value in the rename widget, and then the result after editing
4110 should be passed to <a class="link" href="GFile.html#g-file-set-display-name" title="g_file_set_display_name ()"><code class="function">g_file_set_display_name()</code></a>.</p>
4111 <p>On success the resulting converted filename is returned.</p>
4112 <p>If <em class="parameter"><code>cancellable</code></em>
4113 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
4114 triggering the cancellable object from another thread. If the operation
4115 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 returned.</p>
4116 <div class="refsect3">
4117 <a name="g-file-set-display-name.parameters"></a><h4>Parameters</h4>
4118 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4120 <col width="150px" class="parameters_name">
4121 <col class="parameters_description">
4122 <col width="200px" class="parameters_annotations">
4126 <td class="parameter_name"><p>file</p></td>
4127 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4128 <td class="parameter_annotations"> </td>
4131 <td class="parameter_name"><p>display_name</p></td>
4132 <td class="parameter_description"><p>a string</p></td>
4133 <td class="parameter_annotations"> </td>
4136 <td class="parameter_name"><p>cancellable</p></td>
4137 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
4138 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
4139 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
4142 <td class="parameter_name"><p>error</p></td>
4143 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
4144 <td class="parameter_annotations"> </td>
4149 <div class="refsect3">
4150 <a name="g-file-set-display-name.returns"></a><h4>Returns</h4>
4151 <p> a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> specifying what <em class="parameter"><code>file</code></em>
4153 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there was an error.
4154 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
4155 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
4159 <div class="refsect2">
4160 <a name="g-file-set-display-name-async"></a><h3>g_file_set_display_name_async ()</h3>
4161 <pre class="programlisting"><span class="returnvalue">void</span>
4162 g_file_set_display_name_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
4163 <em class="parameter"><code>const <span class="type">char</span> *display_name</code></em>,
4164 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
4165 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
4166 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
4167 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
4168 <p>Asynchronously sets the display name for a given <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p>
4169 <p>For more details, see <a class="link" href="GFile.html#g-file-set-display-name" title="g_file_set_display_name ()"><code class="function">g_file_set_display_name()</code></a> which is
4170 the synchronous version of this call.</p>
4171 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
4173 You can then call <a class="link" href="GFile.html#g-file-set-display-name-finish" title="g_file_set_display_name_finish ()"><code class="function">g_file_set_display_name_finish()</code></a> to get
4174 the result of the operation.</p>
4175 <div class="refsect3">
4176 <a name="g-file-set-display-name-async.parameters"></a><h4>Parameters</h4>
4177 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4179 <col width="150px" class="parameters_name">
4180 <col class="parameters_description">
4181 <col width="200px" class="parameters_annotations">
4185 <td class="parameter_name"><p>file</p></td>
4186 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4187 <td class="parameter_annotations"> </td>
4190 <td class="parameter_name"><p>display_name</p></td>
4191 <td class="parameter_description"><p>a string</p></td>
4192 <td class="parameter_annotations"> </td>
4195 <td class="parameter_name"><p>io_priority</p></td>
4196 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
4197 <td class="parameter_annotations"> </td>
4200 <td class="parameter_name"><p>cancellable</p></td>
4201 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
4202 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
4203 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
4206 <td class="parameter_name"><p>callback</p></td>
4207 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
4208 when the request is satisfied. </p></td>
4209 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
4212 <td class="parameter_name"><p>user_data</p></td>
4213 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
4214 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
4221 <div class="refsect2">
4222 <a name="g-file-set-display-name-finish"></a><h3>g_file_set_display_name_finish ()</h3>
4223 <pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
4224 g_file_set_display_name_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
4225 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
4226 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
4227 <p>Finishes setting a display name started with
4228 <a class="link" href="GFile.html#g-file-set-display-name-async" title="g_file_set_display_name_async ()"><code class="function">g_file_set_display_name_async()</code></a>.</p>
4229 <div class="refsect3">
4230 <a name="g-file-set-display-name-finish.parameters"></a><h4>Parameters</h4>
4231 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4233 <col width="150px" class="parameters_name">
4234 <col class="parameters_description">
4235 <col width="200px" class="parameters_annotations">
4239 <td class="parameter_name"><p>file</p></td>
4240 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4241 <td class="parameter_annotations"> </td>
4244 <td class="parameter_name"><p>res</p></td>
4245 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
4246 <td class="parameter_annotations"> </td>
4249 <td class="parameter_name"><p>error</p></td>
4250 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
4251 <td class="parameter_annotations"> </td>
4256 <div class="refsect3">
4257 <a name="g-file-set-display-name-finish.returns"></a><h4>Returns</h4>
4258 <p> a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
4259 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
4260 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
4264 <div class="refsect2">
4265 <a name="g-file-delete"></a><h3>g_file_delete ()</h3>
4266 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
4267 g_file_delete (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
4268 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
4269 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
4270 <p>Deletes a file. If the <em class="parameter"><code>file</code></em>
4271 is a directory, it will only be
4272 deleted if it is empty. This has the same semantics as <a href="../glib-File-Utilities.html#g-unlink"><code class="function">g_unlink()</code></a>.</p>
4273 <p>If <em class="parameter"><code>cancellable</code></em>
4274 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
4275 triggering the cancellable object from another thread. If the operation
4276 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 returned.</p>
4277 <p>Virtual: delete_file</p>
4278 <div class="refsect3">
4279 <a name="g-file-delete.parameters"></a><h4>Parameters</h4>
4280 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4282 <col width="150px" class="parameters_name">
4283 <col class="parameters_description">
4284 <col width="200px" class="parameters_annotations">
4288 <td class="parameter_name"><p>file</p></td>
4289 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4290 <td class="parameter_annotations"> </td>
4293 <td class="parameter_name"><p>cancellable</p></td>
4294 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
4295 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
4296 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
4299 <td class="parameter_name"><p>error</p></td>
4300 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
4301 <td class="parameter_annotations"> </td>
4306 <div class="refsect3">
4307 <a name="g-file-delete.returns"></a><h4>Returns</h4>
4308 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file was deleted. <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
4312 <div class="refsect2">
4313 <a name="g-file-delete-async"></a><h3>g_file_delete_async ()</h3>
4314 <pre class="programlisting"><span class="returnvalue">void</span>
4315 g_file_delete_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
4316 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
4317 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
4318 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
4319 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
4320 <p>Asynchronously delete a file. If the <em class="parameter"><code>file</code></em>
4321 is a directory, it will
4322 only be deleted if it is empty. This has the same semantics as
4323 <a href="../glib-File-Utilities.html#g-unlink"><code class="function">g_unlink()</code></a>.</p>
4324 <p>Virtual: delete_file_async</p>
4325 <div class="refsect3">
4326 <a name="g-file-delete-async.parameters"></a><h4>Parameters</h4>
4327 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4329 <col width="150px" class="parameters_name">
4330 <col class="parameters_description">
4331 <col width="200px" class="parameters_annotations">
4335 <td class="parameter_name"><p>file</p></td>
4336 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4337 <td class="parameter_annotations"> </td>
4340 <td class="parameter_name"><p>io_priority</p></td>
4341 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
4342 <td class="parameter_annotations"> </td>
4345 <td class="parameter_name"><p>cancellable</p></td>
4346 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
4347 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
4348 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
4351 <td class="parameter_name"><p>callback</p></td>
4352 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
4353 when the request is satisfied</p></td>
4354 <td class="parameter_annotations"> </td>
4357 <td class="parameter_name"><p>user_data</p></td>
4358 <td class="parameter_description"><p>the data to pass to callback function</p></td>
4359 <td class="parameter_annotations"> </td>
4364 <p class="since">Since: <a class="link" href="api-index-2-34.html#api-index-2.34">2.34</a></p>
4367 <div class="refsect2">
4368 <a name="g-file-delete-finish"></a><h3>g_file_delete_finish ()</h3>
4369 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
4370 g_file_delete_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
4371 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
4372 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
4373 <p>Finishes deleting a file started with <a class="link" href="GFile.html#g-file-delete-async" title="g_file_delete_async ()"><code class="function">g_file_delete_async()</code></a>.</p>
4374 <p>Virtual: delete_file_finish</p>
4375 <div class="refsect3">
4376 <a name="g-file-delete-finish.parameters"></a><h4>Parameters</h4>
4377 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4379 <col width="150px" class="parameters_name">
4380 <col class="parameters_description">
4381 <col width="200px" class="parameters_annotations">
4385 <td class="parameter_name"><p>file</p></td>
4386 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4387 <td class="parameter_annotations"> </td>
4390 <td class="parameter_name"><p>result</p></td>
4391 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
4392 <td class="parameter_annotations"> </td>
4395 <td class="parameter_name"><p>error</p></td>
4396 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
4397 <td class="parameter_annotations"> </td>
4402 <div class="refsect3">
4403 <a name="g-file-delete-finish.returns"></a><h4>Returns</h4>
4404 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file was deleted. <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
4406 <p class="since">Since: <a class="link" href="api-index-2-34.html#api-index-2.34">2.34</a></p>
4409 <div class="refsect2">
4410 <a name="g-file-trash"></a><h3>g_file_trash ()</h3>
4411 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
4412 g_file_trash (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
4413 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
4414 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
4415 <p>Sends <em class="parameter"><code>file</code></em>
4416 to the "Trashcan", if possible. This is similar to
4417 deleting it, but the user can recover it before emptying the trashcan.
4418 Not all file systems support trashing, so this call can return the
4419 <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-SUPPORTED:CAPS"><code class="literal">G_IO_ERROR_NOT_SUPPORTED</code></a> error.</p>
4420 <p>If <em class="parameter"><code>cancellable</code></em>
4421 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
4422 triggering the cancellable object from another thread. If the operation
4423 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 returned.</p>
4424 <p>Virtual: trash</p>
4425 <div class="refsect3">
4426 <a name="g-file-trash.parameters"></a><h4>Parameters</h4>
4427 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4429 <col width="150px" class="parameters_name">
4430 <col class="parameters_description">
4431 <col width="200px" class="parameters_annotations">
4435 <td class="parameter_name"><p>file</p></td>
4436 <td class="parameter_description"><p><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> to send to trash</p></td>
4437 <td class="parameter_annotations"> </td>
4440 <td class="parameter_name"><p>cancellable</p></td>
4441 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
4442 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
4443 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
4446 <td class="parameter_name"><p>error</p></td>
4447 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
4448 <td class="parameter_annotations"> </td>
4453 <div class="refsect3">
4454 <a name="g-file-trash.returns"></a><h4>Returns</h4>
4455 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on successful trash, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
4459 <div class="refsect2">
4460 <a name="g-file-trash-async"></a><h3>g_file_trash_async ()</h3>
4461 <pre class="programlisting"><span class="returnvalue">void</span>
4462 g_file_trash_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
4463 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
4464 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
4465 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
4466 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
4467 <p>Asynchronously sends <em class="parameter"><code>file</code></em>
4468 to the Trash location, if possible.</p>
4469 <p>Virtual: trash_async</p>
4470 <div class="refsect3">
4471 <a name="g-file-trash-async.parameters"></a><h4>Parameters</h4>
4472 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4474 <col width="150px" class="parameters_name">
4475 <col class="parameters_description">
4476 <col width="200px" class="parameters_annotations">
4480 <td class="parameter_name"><p>file</p></td>
4481 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4482 <td class="parameter_annotations"> </td>
4485 <td class="parameter_name"><p>io_priority</p></td>
4486 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
4487 <td class="parameter_annotations"> </td>
4490 <td class="parameter_name"><p>cancellable</p></td>
4491 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
4492 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
4493 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
4496 <td class="parameter_name"><p>callback</p></td>
4497 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
4498 when the request is satisfied</p></td>
4499 <td class="parameter_annotations"> </td>
4502 <td class="parameter_name"><p>user_data</p></td>
4503 <td class="parameter_description"><p>the data to pass to callback function</p></td>
4504 <td class="parameter_annotations"> </td>
4509 <p class="since">Since: <a class="link" href="api-index-2-38.html#api-index-2.38">2.38</a></p>
4512 <div class="refsect2">
4513 <a name="g-file-trash-finish"></a><h3>g_file_trash_finish ()</h3>
4514 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
4515 g_file_trash_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
4516 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
4517 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
4518 <p>Finishes an asynchronous file trashing operation, started with
4519 <a class="link" href="GFile.html#g-file-trash-async" title="g_file_trash_async ()"><code class="function">g_file_trash_async()</code></a>.</p>
4520 <p>Virtual: trash_finish</p>
4521 <div class="refsect3">
4522 <a name="g-file-trash-finish.parameters"></a><h4>Parameters</h4>
4523 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4525 <col width="150px" class="parameters_name">
4526 <col class="parameters_description">
4527 <col width="200px" class="parameters_annotations">
4531 <td class="parameter_name"><p>file</p></td>
4532 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4533 <td class="parameter_annotations"> </td>
4536 <td class="parameter_name"><p>result</p></td>
4537 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
4538 <td class="parameter_annotations"> </td>
4541 <td class="parameter_name"><p>error</p></td>
4542 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
4543 <td class="parameter_annotations"> </td>
4548 <div class="refsect3">
4549 <a name="g-file-trash-finish.returns"></a><h4>Returns</h4>
4550 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on successful trash, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
4552 <p class="since">Since: <a class="link" href="api-index-2-38.html#api-index-2.38">2.38</a></p>
4555 <div class="refsect2">
4556 <a name="g-file-copy"></a><h3>g_file_copy ()</h3>
4557 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
4558 g_file_copy (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *source</code></em>,
4559 <em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *destination</code></em>,
4560 <em class="parameter"><code><a class="link" href="GFile.html#GFileCopyFlags" title="enum GFileCopyFlags"><span class="type">GFileCopyFlags</span></a> flags</code></em>,
4561 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
4562 <em class="parameter"><code><a class="link" href="GFile.html#GFileProgressCallback" title="GFileProgressCallback ()"><span class="type">GFileProgressCallback</span></a> progress_callback</code></em>,
4563 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> progress_callback_data</code></em>,
4564 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
4565 <p>Copies the file <em class="parameter"><code>source</code></em>
4566 to the location specified by <em class="parameter"><code>destination</code></em>
4568 Can not handle recursive copies of directories.</p>
4569 <p>If the flag <a class="link" href="GFile.html#G-FILE-COPY-OVERWRITE:CAPS"><span class="type">G_FILE_COPY_OVERWRITE</span></a> is specified an already
4570 existing <em class="parameter"><code>destination</code></em>
4571 file is overwritten.</p>
4572 <p>If the flag <a class="link" href="GFile.html#G-FILE-COPY-NOFOLLOW-SYMLINKS:CAPS"><span class="type">G_FILE_COPY_NOFOLLOW_SYMLINKS</span></a> is specified then symlinks
4573 will be copied as symlinks, otherwise the target of the
4574 <em class="parameter"><code>source</code></em>
4575 symlink will be copied.</p>
4576 <p>If <em class="parameter"><code>cancellable</code></em>
4577 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
4578 triggering the cancellable object from another thread. If the operation
4579 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 returned.</p>
4580 <p>If <em class="parameter"><code>progress_callback</code></em>
4581 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be monitored
4582 by setting this to a <a class="link" href="GFile.html#GFileProgressCallback" title="GFileProgressCallback ()"><span class="type">GFileProgressCallback</span></a> function.
4583 <em class="parameter"><code>progress_callback_data</code></em>
4584 will be passed to this function. It is guaranteed
4585 that this callback will be called after all data has been transferred with
4586 the total number of bytes copied during the operation.</p>
4587 <p>If the <em class="parameter"><code>source</code></em>
4588 file does not exist, then the <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-FOUND:CAPS"><code class="literal">G_IO_ERROR_NOT_FOUND</code></a> error
4589 is returned, independent on the status of the <em class="parameter"><code>destination</code></em>
4591 <p>If <a class="link" href="GFile.html#G-FILE-COPY-OVERWRITE:CAPS"><span class="type">G_FILE_COPY_OVERWRITE</span></a> is not specified and the target exists, then
4592 the error <a class="link" href="gio-GIOError.html#G-IO-ERROR-EXISTS:CAPS"><code class="literal">G_IO_ERROR_EXISTS</code></a> is returned.</p>
4593 <p>If trying to overwrite a file over a directory, the <a class="link" href="gio-GIOError.html#G-IO-ERROR-IS-DIRECTORY:CAPS"><code class="literal">G_IO_ERROR_IS_DIRECTORY</code></a>
4594 error is returned. If trying to overwrite a directory with a directory the
4595 <a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-MERGE:CAPS"><code class="literal">G_IO_ERROR_WOULD_MERGE</code></a> error is returned.</p>
4596 <p>If the source is a directory and the target does not exist, or
4597 <a class="link" href="GFile.html#G-FILE-COPY-OVERWRITE:CAPS"><span class="type">G_FILE_COPY_OVERWRITE</span></a> is specified and the target is a file, then the
4598 <a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-RECURSE:CAPS"><code class="literal">G_IO_ERROR_WOULD_RECURSE</code></a> error is returned.</p>
4599 <p>If you are interested in copying the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> object itself (not the on-disk
4600 file), see <a class="link" href="GFile.html#g-file-dup" title="g_file_dup ()"><code class="function">g_file_dup()</code></a>.</p>
4601 <div class="refsect3">
4602 <a name="g-file-copy.parameters"></a><h4>Parameters</h4>
4603 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4605 <col width="150px" class="parameters_name">
4606 <col class="parameters_description">
4607 <col width="200px" class="parameters_annotations">
4611 <td class="parameter_name"><p>source</p></td>
4612 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4613 <td class="parameter_annotations"> </td>
4616 <td class="parameter_name"><p>destination</p></td>
4617 <td class="parameter_description"><p>destination <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4618 <td class="parameter_annotations"> </td>
4621 <td class="parameter_name"><p>flags</p></td>
4622 <td class="parameter_description"><p>set of <a class="link" href="GFile.html#GFileCopyFlags" title="enum GFileCopyFlags"><span class="type">GFileCopyFlags</span></a></p></td>
4623 <td class="parameter_annotations"> </td>
4626 <td class="parameter_name"><p>cancellable</p></td>
4627 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
4628 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
4629 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
4632 <td class="parameter_name"><p>progress_callback</p></td>
4633 <td class="parameter_description"><p> function to callback with
4634 progress information, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if progress information is not needed. </p></td>
4635 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
4638 <td class="parameter_name"><p>progress_callback_data</p></td>
4639 <td class="parameter_description"><p> user data to pass to <em class="parameter"><code>progress_callback</code></em>
4641 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
4644 <td class="parameter_name"><p>error</p></td>
4645 <td class="parameter_description"><p><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> to set on error, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
4646 <td class="parameter_annotations"> </td>
4651 <div class="refsect3">
4652 <a name="g-file-copy.returns"></a><h4>Returns</h4>
4653 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
4657 <div class="refsect2">
4658 <a name="g-file-copy-async"></a><h3>g_file_copy_async ()</h3>
4659 <pre class="programlisting"><span class="returnvalue">void</span>
4660 g_file_copy_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *source</code></em>,
4661 <em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *destination</code></em>,
4662 <em class="parameter"><code><a class="link" href="GFile.html#GFileCopyFlags" title="enum GFileCopyFlags"><span class="type">GFileCopyFlags</span></a> flags</code></em>,
4663 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
4664 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
4665 <em class="parameter"><code><a class="link" href="GFile.html#GFileProgressCallback" title="GFileProgressCallback ()"><span class="type">GFileProgressCallback</span></a> progress_callback</code></em>,
4666 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> progress_callback_data</code></em>,
4667 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
4668 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
4669 <p>Copies the file <em class="parameter"><code>source</code></em>
4670 to the location specified by <em class="parameter"><code>destination</code></em>
4672 asynchronously. For details of the behaviour, see <a class="link" href="GFile.html#g-file-copy" title="g_file_copy ()"><code class="function">g_file_copy()</code></a>.</p>
4673 <p>If <em class="parameter"><code>progress_callback</code></em>
4674 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then that function that will be called
4675 just like in <a class="link" href="GFile.html#g-file-copy" title="g_file_copy ()"><code class="function">g_file_copy()</code></a>. The callback will run in the default main context
4676 of the thread calling <a class="link" href="GFile.html#g-file-copy-async" title="g_file_copy_async ()"><code class="function">g_file_copy_async()</code></a> — the same context as <em class="parameter"><code>callback</code></em>
4679 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
4680 will be called. You can then call
4681 <a class="link" href="GFile.html#g-file-copy-finish" title="g_file_copy_finish ()"><code class="function">g_file_copy_finish()</code></a> to get the result of the operation.</p>
4682 <div class="refsect3">
4683 <a name="g-file-copy-async.parameters"></a><h4>Parameters</h4>
4684 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4686 <col width="150px" class="parameters_name">
4687 <col class="parameters_description">
4688 <col width="200px" class="parameters_annotations">
4692 <td class="parameter_name"><p>source</p></td>
4693 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4694 <td class="parameter_annotations"> </td>
4697 <td class="parameter_name"><p>destination</p></td>
4698 <td class="parameter_description"><p>destination <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4699 <td class="parameter_annotations"> </td>
4702 <td class="parameter_name"><p>flags</p></td>
4703 <td class="parameter_description"><p>set of <a class="link" href="GFile.html#GFileCopyFlags" title="enum GFileCopyFlags"><span class="type">GFileCopyFlags</span></a></p></td>
4704 <td class="parameter_annotations"> </td>
4707 <td class="parameter_name"><p>io_priority</p></td>
4708 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
4709 <td class="parameter_annotations"> </td>
4712 <td class="parameter_name"><p>cancellable</p></td>
4713 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
4714 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
4715 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
4718 <td class="parameter_name"><p>progress_callback</p></td>
4719 <td class="parameter_description"><p> function to callback with progress
4720 information, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if progress information is not needed. </p></td>
4721 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The callback is valid until the GDestroyNotify argument is called."><span class="acronym">scope notified</span></acronym>]</span></td>
4724 <td class="parameter_name"><p>progress_callback_data</p></td>
4725 <td class="parameter_description"><p> user data to pass to <em class="parameter"><code>progress_callback</code></em>
4727 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym> progress_callback][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
4730 <td class="parameter_name"><p>callback</p></td>
4731 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied. </p></td>
4732 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
4735 <td class="parameter_name"><p>user_data</p></td>
4736 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
4737 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym> callback]</span></td>
4744 <div class="refsect2">
4745 <a name="g-file-copy-finish"></a><h3>g_file_copy_finish ()</h3>
4746 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
4747 g_file_copy_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
4748 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
4749 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
4750 <p>Finishes copying the file started with <a class="link" href="GFile.html#g-file-copy-async" title="g_file_copy_async ()"><code class="function">g_file_copy_async()</code></a>.</p>
4751 <div class="refsect3">
4752 <a name="g-file-copy-finish.parameters"></a><h4>Parameters</h4>
4753 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4755 <col width="150px" class="parameters_name">
4756 <col class="parameters_description">
4757 <col width="200px" class="parameters_annotations">
4761 <td class="parameter_name"><p>file</p></td>
4762 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4763 <td class="parameter_annotations"> </td>
4766 <td class="parameter_name"><p>res</p></td>
4767 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
4768 <td class="parameter_annotations"> </td>
4771 <td class="parameter_name"><p>error</p></td>
4772 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
4773 <td class="parameter_annotations"> </td>
4778 <div class="refsect3">
4779 <a name="g-file-copy-finish.returns"></a><h4>Returns</h4>
4780 <p> a <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</p>
4784 <div class="refsect2">
4785 <a name="g-file-move"></a><h3>g_file_move ()</h3>
4786 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
4787 g_file_move (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *source</code></em>,
4788 <em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *destination</code></em>,
4789 <em class="parameter"><code><a class="link" href="GFile.html#GFileCopyFlags" title="enum GFileCopyFlags"><span class="type">GFileCopyFlags</span></a> flags</code></em>,
4790 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
4791 <em class="parameter"><code><a class="link" href="GFile.html#GFileProgressCallback" title="GFileProgressCallback ()"><span class="type">GFileProgressCallback</span></a> progress_callback</code></em>,
4792 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> progress_callback_data</code></em>,
4793 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
4794 <p>Tries to move the file or directory <em class="parameter"><code>source</code></em>
4795 to the location specified
4796 by <em class="parameter"><code>destination</code></em>
4797 . If native move operations are supported then this is
4798 used, otherwise a copy + delete fallback is used. The native
4799 implementation may support moving directories (for instance on moves
4800 inside the same filesystem), but the fallback code does not.</p>
4801 <p>If the flag <a class="link" href="GFile.html#G-FILE-COPY-OVERWRITE:CAPS"><span class="type">G_FILE_COPY_OVERWRITE</span></a> is specified an already
4802 existing <em class="parameter"><code>destination</code></em>
4803 file is overwritten.</p>
4804 <p>If the flag <a class="link" href="GFile.html#G-FILE-COPY-NOFOLLOW-SYMLINKS:CAPS"><span class="type">G_FILE_COPY_NOFOLLOW_SYMLINKS</span></a> is specified then symlinks
4805 will be copied as symlinks, otherwise the target of the
4806 <em class="parameter"><code>source</code></em>
4807 symlink will be copied.</p>
4808 <p>If <em class="parameter"><code>cancellable</code></em>
4809 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
4810 triggering the cancellable object from another thread. If the operation
4811 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 returned.</p>
4812 <p>If <em class="parameter"><code>progress_callback</code></em>
4813 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be monitored
4814 by setting this to a <a class="link" href="GFile.html#GFileProgressCallback" title="GFileProgressCallback ()"><span class="type">GFileProgressCallback</span></a> function.
4815 <em class="parameter"><code>progress_callback_data</code></em>
4816 will be passed to this function. It is
4817 guaranteed that this callback will be called after all data has been
4818 transferred with the total number of bytes copied during the operation.</p>
4819 <p>If the <em class="parameter"><code>source</code></em>
4820 file does not exist, then the <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-FOUND:CAPS"><code class="literal">G_IO_ERROR_NOT_FOUND</code></a>
4821 error is returned, independent on the status of the <em class="parameter"><code>destination</code></em>
4823 <p>If <a class="link" href="GFile.html#G-FILE-COPY-OVERWRITE:CAPS"><span class="type">G_FILE_COPY_OVERWRITE</span></a> is not specified and the target exists,
4824 then the error <a class="link" href="gio-GIOError.html#G-IO-ERROR-EXISTS:CAPS"><code class="literal">G_IO_ERROR_EXISTS</code></a> is returned.</p>
4825 <p>If trying to overwrite a file over a directory, the <a class="link" href="gio-GIOError.html#G-IO-ERROR-IS-DIRECTORY:CAPS"><code class="literal">G_IO_ERROR_IS_DIRECTORY</code></a>
4826 error is returned. If trying to overwrite a directory with a directory the
4827 <a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-MERGE:CAPS"><code class="literal">G_IO_ERROR_WOULD_MERGE</code></a> error is returned.</p>
4828 <p>If the source is a directory and the target does not exist, or
4829 <a class="link" href="GFile.html#G-FILE-COPY-OVERWRITE:CAPS"><span class="type">G_FILE_COPY_OVERWRITE</span></a> is specified and the target is a file, then
4830 the <a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-RECURSE:CAPS"><code class="literal">G_IO_ERROR_WOULD_RECURSE</code></a> error may be returned (if the native
4831 move operation isn't available).</p>
4832 <div class="refsect3">
4833 <a name="g-file-move.parameters"></a><h4>Parameters</h4>
4834 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4836 <col width="150px" class="parameters_name">
4837 <col class="parameters_description">
4838 <col width="200px" class="parameters_annotations">
4842 <td class="parameter_name"><p>source</p></td>
4843 <td class="parameter_description"><p><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> pointing to the source location</p></td>
4844 <td class="parameter_annotations"> </td>
4847 <td class="parameter_name"><p>destination</p></td>
4848 <td class="parameter_description"><p><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> pointing to the destination location</p></td>
4849 <td class="parameter_annotations"> </td>
4852 <td class="parameter_name"><p>flags</p></td>
4853 <td class="parameter_description"><p>set of <a class="link" href="GFile.html#GFileCopyFlags" title="enum GFileCopyFlags"><span class="type">GFileCopyFlags</span></a></p></td>
4854 <td class="parameter_annotations"> </td>
4857 <td class="parameter_name"><p>cancellable</p></td>
4858 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
4859 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
4860 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
4863 <td class="parameter_name"><p>progress_callback</p></td>
4864 <td class="parameter_description"><p> <a class="link" href="GFile.html#GFileProgressCallback" title="GFileProgressCallback ()"><span class="type">GFileProgressCallback</span></a>
4865 function for updates. </p></td>
4866 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
4869 <td class="parameter_name"><p>progress_callback_data</p></td>
4870 <td class="parameter_description"><p> gpointer to user data for
4871 the callback function. </p></td>
4872 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
4875 <td class="parameter_name"><p>error</p></td>
4876 <td class="parameter_description"><p><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for returning error conditions, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
4877 <td class="parameter_annotations"> </td>
4882 <div class="refsect3">
4883 <a name="g-file-move.returns"></a><h4>Returns</h4>
4884 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on successful move, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
4888 <div class="refsect2">
4889 <a name="g-file-make-directory"></a><h3>g_file_make_directory ()</h3>
4890 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
4891 g_file_make_directory (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
4892 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
4893 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
4894 <p>Creates a directory. Note that this will only create a child directory
4895 of the immediate parent directory of the path or URI given by the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.
4896 To recursively create directories, see <a class="link" href="GFile.html#g-file-make-directory-with-parents" title="g_file_make_directory_with_parents ()"><code class="function">g_file_make_directory_with_parents()</code></a>.
4897 This function will fail if the parent directory does not exist, setting
4898 <em class="parameter"><code>error</code></em>
4899 to <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-FOUND:CAPS"><code class="literal">G_IO_ERROR_NOT_FOUND</code></a>. If the file system doesn't support
4900 creating directories, this function will fail, setting <em class="parameter"><code>error</code></em>
4902 <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-SUPPORTED:CAPS"><code class="literal">G_IO_ERROR_NOT_SUPPORTED</code></a>.</p>
4903 <p>For a local <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> the newly created directory will have the default
4904 (current) ownership and permissions of the current process.</p>
4905 <p>If <em class="parameter"><code>cancellable</code></em>
4906 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
4907 triggering the cancellable object from another thread. If the operation
4908 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 returned.</p>
4909 <div class="refsect3">
4910 <a name="g-file-make-directory.parameters"></a><h4>Parameters</h4>
4911 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4913 <col width="150px" class="parameters_name">
4914 <col class="parameters_description">
4915 <col width="200px" class="parameters_annotations">
4919 <td class="parameter_name"><p>file</p></td>
4920 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4921 <td class="parameter_annotations"> </td>
4924 <td class="parameter_name"><p>cancellable</p></td>
4925 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
4926 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
4927 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
4930 <td class="parameter_name"><p>error</p></td>
4931 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
4932 <td class="parameter_annotations"> </td>
4937 <div class="refsect3">
4938 <a name="g-file-make-directory.returns"></a><h4>Returns</h4>
4939 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on successful creation, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
4943 <div class="refsect2">
4944 <a name="g-file-make-directory-async"></a><h3>g_file_make_directory_async ()</h3>
4945 <pre class="programlisting"><span class="returnvalue">void</span>
4946 g_file_make_directory_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
4947 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
4948 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
4949 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
4950 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
4951 <p>Asynchronously creates a directory.</p>
4952 <p>Virtual: make_directory_async</p>
4953 <div class="refsect3">
4954 <a name="g-file-make-directory-async.parameters"></a><h4>Parameters</h4>
4955 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4957 <col width="150px" class="parameters_name">
4958 <col class="parameters_description">
4959 <col width="200px" class="parameters_annotations">
4963 <td class="parameter_name"><p>file</p></td>
4964 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
4965 <td class="parameter_annotations"> </td>
4968 <td class="parameter_name"><p>io_priority</p></td>
4969 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
4970 <td class="parameter_annotations"> </td>
4973 <td class="parameter_name"><p>cancellable</p></td>
4974 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
4975 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
4976 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
4979 <td class="parameter_name"><p>callback</p></td>
4980 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
4981 when the request is satisfied</p></td>
4982 <td class="parameter_annotations"> </td>
4985 <td class="parameter_name"><p>user_data</p></td>
4986 <td class="parameter_description"><p>the data to pass to callback function</p></td>
4987 <td class="parameter_annotations"> </td>
4992 <p class="since">Since: <a class="link" href="api-index-2-38.html#api-index-2.38">2.38</a></p>
4995 <div class="refsect2">
4996 <a name="g-file-make-directory-finish"></a><h3>g_file_make_directory_finish ()</h3>
4997 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
4998 g_file_make_directory_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
4999 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
5000 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
5001 <p>Finishes an asynchronous directory creation, started with
5002 <a class="link" href="GFile.html#g-file-make-directory-async" title="g_file_make_directory_async ()"><code class="function">g_file_make_directory_async()</code></a>.</p>
5003 <p>Virtual: make_directory_finish</p>
5004 <div class="refsect3">
5005 <a name="g-file-make-directory-finish.parameters"></a><h4>Parameters</h4>
5006 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5008 <col width="150px" class="parameters_name">
5009 <col class="parameters_description">
5010 <col width="200px" class="parameters_annotations">
5014 <td class="parameter_name"><p>file</p></td>
5015 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
5016 <td class="parameter_annotations"> </td>
5019 <td class="parameter_name"><p>result</p></td>
5020 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
5021 <td class="parameter_annotations"> </td>
5024 <td class="parameter_name"><p>error</p></td>
5025 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
5026 <td class="parameter_annotations"> </td>
5031 <div class="refsect3">
5032 <a name="g-file-make-directory-finish.returns"></a><h4>Returns</h4>
5033 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on successful directory creation, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
5035 <p class="since">Since: <a class="link" href="api-index-2-38.html#api-index-2.38">2.38</a></p>
5038 <div class="refsect2">
5039 <a name="g-file-make-directory-with-parents"></a><h3>g_file_make_directory_with_parents ()</h3>
5040 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
5041 g_file_make_directory_with_parents (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5042 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
5043 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
5044 <p>Creates a directory and any parent directories that may not
5045 exist similar to 'mkdir -p'. If the file system does not support
5046 creating directories, this function will fail, setting <em class="parameter"><code>error</code></em>
5048 <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-SUPPORTED:CAPS"><code class="literal">G_IO_ERROR_NOT_SUPPORTED</code></a>. If the directory itself already exists,
5049 this function will fail setting <em class="parameter"><code>error</code></em>
5050 to <a class="link" href="gio-GIOError.html#G-IO-ERROR-EXISTS:CAPS"><code class="literal">G_IO_ERROR_EXISTS</code></a>, unlike
5051 the similar <a href="../glib-File-Utilities.html#g-mkdir-with-parents"><code class="function">g_mkdir_with_parents()</code></a>.</p>
5052 <p>For a local <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> the newly created directories will have the default
5053 (current) ownership and permissions of the current process.</p>
5054 <p>If <em class="parameter"><code>cancellable</code></em>
5055 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
5056 triggering the cancellable object from another thread. If the operation
5057 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 returned.</p>
5058 <div class="refsect3">
5059 <a name="g-file-make-directory-with-parents.parameters"></a><h4>Parameters</h4>
5060 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5062 <col width="150px" class="parameters_name">
5063 <col class="parameters_description">
5064 <col width="200px" class="parameters_annotations">
5068 <td class="parameter_name"><p>file</p></td>
5069 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
5070 <td class="parameter_annotations"> </td>
5073 <td class="parameter_name"><p>cancellable</p></td>
5074 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
5075 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
5076 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5079 <td class="parameter_name"><p>error</p></td>
5080 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
5081 <td class="parameter_annotations"> </td>
5086 <div class="refsect3">
5087 <a name="g-file-make-directory-with-parents.returns"></a><h4>Returns</h4>
5088 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if all directories have been successfully created, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
5091 <p class="since">Since: <a class="link" href="api-index-2-18.html#api-index-2.18">2.18</a></p>
5094 <div class="refsect2">
5095 <a name="g-file-make-symbolic-link"></a><h3>g_file_make_symbolic_link ()</h3>
5096 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
5097 g_file_make_symbolic_link (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5098 <em class="parameter"><code>const <span class="type">char</span> *symlink_value</code></em>,
5099 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
5100 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
5101 <p>Creates a symbolic link named <em class="parameter"><code>file</code></em>
5102 which contains the string
5103 <em class="parameter"><code>symlink_value</code></em>
5105 <p>If <em class="parameter"><code>cancellable</code></em>
5106 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
5107 triggering the cancellable object from another thread. If the operation
5108 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 returned.</p>
5109 <div class="refsect3">
5110 <a name="g-file-make-symbolic-link.parameters"></a><h4>Parameters</h4>
5111 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5113 <col width="150px" class="parameters_name">
5114 <col class="parameters_description">
5115 <col width="200px" class="parameters_annotations">
5119 <td class="parameter_name"><p>file</p></td>
5120 <td class="parameter_description"><p>a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> with the name of the symlink to create</p></td>
5121 <td class="parameter_annotations"> </td>
5124 <td class="parameter_name"><p>symlink_value</p></td>
5125 <td class="parameter_description"><p> a string with the path for the target
5126 of the new symlink. </p></td>
5127 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename]</span></td>
5130 <td class="parameter_name"><p>cancellable</p></td>
5131 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
5132 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
5133 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5136 <td class="parameter_name"><p>error</p></td>
5137 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a></p></td>
5138 <td class="parameter_annotations"> </td>
5143 <div class="refsect3">
5144 <a name="g-file-make-symbolic-link.returns"></a><h4>Returns</h4>
5145 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on the creation of a new symlink, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
5149 <div class="refsect2">
5150 <a name="g-file-query-settable-attributes"></a><h3>g_file_query_settable_attributes ()</h3>
5151 <pre class="programlisting"><a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList"><span class="returnvalue">GFileAttributeInfoList</span></a> *
5152 g_file_query_settable_attributes (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5153 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
5154 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
5155 <p>Obtain the list of settable attributes for the file.</p>
5156 <p>Returns the type and full attribute name of all the attributes
5157 that can be set on this file. This doesn't mean setting it will
5158 always succeed though, you might get an access failure, or some
5159 specific file may not support a specific attribute.</p>
5160 <p>If <em class="parameter"><code>cancellable</code></em>
5161 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
5162 triggering the cancellable object from another thread. If the operation
5163 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 returned.</p>
5164 <div class="refsect3">
5165 <a name="g-file-query-settable-attributes.parameters"></a><h4>Parameters</h4>
5166 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5168 <col width="150px" class="parameters_name">
5169 <col class="parameters_description">
5170 <col width="200px" class="parameters_annotations">
5174 <td class="parameter_name"><p>file</p></td>
5175 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
5176 <td class="parameter_annotations"> </td>
5179 <td class="parameter_name"><p>cancellable</p></td>
5180 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
5181 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
5182 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5185 <td class="parameter_name"><p>error</p></td>
5186 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
5187 <td class="parameter_annotations"> </td>
5192 <div class="refsect3">
5193 <a name="g-file-query-settable-attributes.returns"></a><h4>Returns</h4>
5194 <p> a <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList"><span class="type">GFileAttributeInfoList</span></a> describing the settable attributes.
5195 When you are done with it, release it with
5196 <a class="link" href="gio-GFileAttribute.html#g-file-attribute-info-list-unref" title="g_file_attribute_info_list_unref ()"><code class="function">g_file_attribute_info_list_unref()</code></a></p>
5200 <div class="refsect2">
5201 <a name="g-file-query-writable-namespaces"></a><h3>g_file_query_writable_namespaces ()</h3>
5202 <pre class="programlisting"><a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList"><span class="returnvalue">GFileAttributeInfoList</span></a> *
5203 g_file_query_writable_namespaces (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5204 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
5205 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
5206 <p>Obtain the list of attribute namespaces where new attributes
5207 can be created by a user. An example of this is extended
5208 attributes (in the "xattr" namespace).</p>
5209 <p>If <em class="parameter"><code>cancellable</code></em>
5210 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
5211 triggering the cancellable object from another thread. If the operation
5212 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 returned.</p>
5213 <div class="refsect3">
5214 <a name="g-file-query-writable-namespaces.parameters"></a><h4>Parameters</h4>
5215 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5217 <col width="150px" class="parameters_name">
5218 <col class="parameters_description">
5219 <col width="200px" class="parameters_annotations">
5223 <td class="parameter_name"><p>file</p></td>
5224 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
5225 <td class="parameter_annotations"> </td>
5228 <td class="parameter_name"><p>cancellable</p></td>
5229 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
5230 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
5231 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5234 <td class="parameter_name"><p>error</p></td>
5235 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
5236 <td class="parameter_annotations"> </td>
5241 <div class="refsect3">
5242 <a name="g-file-query-writable-namespaces.returns"></a><h4>Returns</h4>
5243 <p> a <a class="link" href="gio-GFileAttribute.html#GFileAttributeInfoList"><span class="type">GFileAttributeInfoList</span></a> describing the writable namespaces.
5244 When you are done with it, release it with
5245 <a class="link" href="gio-GFileAttribute.html#g-file-attribute-info-list-unref" title="g_file_attribute_info_list_unref ()"><code class="function">g_file_attribute_info_list_unref()</code></a></p>
5249 <div class="refsect2">
5250 <a name="g-file-set-attribute"></a><h3>g_file_set_attribute ()</h3>
5251 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
5252 g_file_set_attribute (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5253 <em class="parameter"><code>const <span class="type">char</span> *attribute</code></em>,
5254 <em class="parameter"><code><a class="link" href="gio-GFileAttribute.html#GFileAttributeType" title="enum GFileAttributeType"><span class="type">GFileAttributeType</span></a> type</code></em>,
5255 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> value_p</code></em>,
5256 <em class="parameter"><code><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> flags</code></em>,
5257 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
5258 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
5259 <p>Sets an attribute in the file with attribute name <em class="parameter"><code>attribute</code></em>
5260 to <em class="parameter"><code>value</code></em>
5262 <p>Some attributes can be unset by setting <em class="parameter"><code>attribute</code></em>
5264 <a class="link" href="gio-GFileAttribute.html#G-FILE-ATTRIBUTE-TYPE-INVALID:CAPS"><code class="literal">G_FILE_ATTRIBUTE_TYPE_INVALID</code></a> and <em class="parameter"><code>value_p</code></em>
5265 to <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
5266 <p>If <em class="parameter"><code>cancellable</code></em>
5267 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
5268 triggering the cancellable object from another thread. If the operation
5269 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 returned.</p>
5270 <div class="refsect3">
5271 <a name="g-file-set-attribute.parameters"></a><h4>Parameters</h4>
5272 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5274 <col width="150px" class="parameters_name">
5275 <col class="parameters_description">
5276 <col width="200px" class="parameters_annotations">
5280 <td class="parameter_name"><p>file</p></td>
5281 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
5282 <td class="parameter_annotations"> </td>
5285 <td class="parameter_name"><p>attribute</p></td>
5286 <td class="parameter_description"><p>a string containing the attribute's name</p></td>
5287 <td class="parameter_annotations"> </td>
5290 <td class="parameter_name"><p>type</p></td>
5291 <td class="parameter_description"><p>The type of the attribute</p></td>
5292 <td class="parameter_annotations"> </td>
5295 <td class="parameter_name"><p>value_p</p></td>
5296 <td class="parameter_description"><p> a pointer to the value (or the pointer
5297 itself if the type is a pointer type). </p></td>
5298 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5301 <td class="parameter_name"><p>flags</p></td>
5302 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a></p></td>
5303 <td class="parameter_annotations"> </td>
5306 <td class="parameter_name"><p>cancellable</p></td>
5307 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
5308 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
5309 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5312 <td class="parameter_name"><p>error</p></td>
5313 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
5314 <td class="parameter_annotations"> </td>
5319 <div class="refsect3">
5320 <a name="g-file-set-attribute.returns"></a><h4>Returns</h4>
5321 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the attribute was set, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
5325 <div class="refsect2">
5326 <a name="g-file-set-attributes-from-info"></a><h3>g_file_set_attributes_from_info ()</h3>
5327 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
5328 g_file_set_attributes_from_info (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5329 <em class="parameter"><code><a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> *info</code></em>,
5330 <em class="parameter"><code><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> flags</code></em>,
5331 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
5332 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
5333 <p>Tries to set all attributes in the <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> on the target
5334 values, not stopping on the first error.</p>
5335 <p>If there is any error during this operation then <em class="parameter"><code>error</code></em>
5337 be set to the first error. Error on particular fields are flagged
5338 by setting the "status" field in the attribute value to
5339 <a class="link" href="gio-GFileAttribute.html#G-FILE-ATTRIBUTE-STATUS-ERROR-SETTING:CAPS"><code class="literal">G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING</code></a>, which means you can
5340 also detect further errors.</p>
5341 <p>If <em class="parameter"><code>cancellable</code></em>
5342 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
5343 triggering the cancellable object from another thread. If the operation
5344 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 returned.</p>
5345 <div class="refsect3">
5346 <a name="g-file-set-attributes-from-info.parameters"></a><h4>Parameters</h4>
5347 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5349 <col width="150px" class="parameters_name">
5350 <col class="parameters_description">
5351 <col width="200px" class="parameters_annotations">
5355 <td class="parameter_name"><p>file</p></td>
5356 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
5357 <td class="parameter_annotations"> </td>
5360 <td class="parameter_name"><p>info</p></td>
5361 <td class="parameter_description"><p>a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a></p></td>
5362 <td class="parameter_annotations"> </td>
5365 <td class="parameter_name"><p>flags</p></td>
5366 <td class="parameter_description"><p><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a></p></td>
5367 <td class="parameter_annotations"> </td>
5370 <td class="parameter_name"><p>cancellable</p></td>
5371 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
5372 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
5373 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5376 <td class="parameter_name"><p>error</p></td>
5377 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
5378 <td class="parameter_annotations"> </td>
5383 <div class="refsect3">
5384 <a name="g-file-set-attributes-from-info.returns"></a><h4>Returns</h4>
5385 <p> <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if there was any error, <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> otherwise.</p>
5389 <div class="refsect2">
5390 <a name="g-file-set-attributes-async"></a><h3>g_file_set_attributes_async ()</h3>
5391 <pre class="programlisting"><span class="returnvalue">void</span>
5392 g_file_set_attributes_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5393 <em class="parameter"><code><a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> *info</code></em>,
5394 <em class="parameter"><code><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> flags</code></em>,
5395 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
5396 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
5397 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
5398 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
5399 <p>Asynchronously sets the attributes of <em class="parameter"><code>file</code></em>
5400 with <em class="parameter"><code>info</code></em>
5402 <p>For more details, see <a class="link" href="GFile.html#g-file-set-attributes-from-info" title="g_file_set_attributes_from_info ()"><code class="function">g_file_set_attributes_from_info()</code></a>,
5403 which is the synchronous version of this call.</p>
5404 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
5406 You can then call <a class="link" href="GFile.html#g-file-set-attributes-finish" title="g_file_set_attributes_finish ()"><code class="function">g_file_set_attributes_finish()</code></a> to get
5407 the result of the operation.</p>
5408 <div class="refsect3">
5409 <a name="g-file-set-attributes-async.parameters"></a><h4>Parameters</h4>
5410 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5412 <col width="150px" class="parameters_name">
5413 <col class="parameters_description">
5414 <col width="200px" class="parameters_annotations">
5418 <td class="parameter_name"><p>file</p></td>
5419 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
5420 <td class="parameter_annotations"> </td>
5423 <td class="parameter_name"><p>info</p></td>
5424 <td class="parameter_description"><p>a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a></p></td>
5425 <td class="parameter_annotations"> </td>
5428 <td class="parameter_name"><p>flags</p></td>
5429 <td class="parameter_description"><p>a <a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a></p></td>
5430 <td class="parameter_annotations"> </td>
5433 <td class="parameter_name"><p>io_priority</p></td>
5434 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
5435 <td class="parameter_annotations"> </td>
5438 <td class="parameter_name"><p>cancellable</p></td>
5439 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
5440 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
5441 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5444 <td class="parameter_name"><p>callback</p></td>
5445 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. </p></td>
5446 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
5449 <td class="parameter_name"><p>user_data</p></td>
5450 <td class="parameter_description"><p> a <a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>. </p></td>
5451 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
5458 <div class="refsect2">
5459 <a name="g-file-set-attributes-finish"></a><h3>g_file_set_attributes_finish ()</h3>
5460 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
5461 g_file_set_attributes_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5462 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
5463 <em class="parameter"><code><a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> **info</code></em>,
5464 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
5465 <p>Finishes setting an attribute started in <a class="link" href="GFile.html#g-file-set-attributes-async" title="g_file_set_attributes_async ()"><code class="function">g_file_set_attributes_async()</code></a>.</p>
5466 <div class="refsect3">
5467 <a name="g-file-set-attributes-finish.parameters"></a><h4>Parameters</h4>
5468 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5470 <col width="150px" class="parameters_name">
5471 <col class="parameters_description">
5472 <col width="200px" class="parameters_annotations">
5476 <td class="parameter_name"><p>file</p></td>
5477 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
5478 <td class="parameter_annotations"> </td>
5481 <td class="parameter_name"><p>result</p></td>
5482 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
5483 <td class="parameter_annotations"> </td>
5486 <td class="parameter_name"><p>info</p></td>
5487 <td class="parameter_description"><p> a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a>. </p></td>
5488 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
5491 <td class="parameter_name"><p>error</p></td>
5492 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
5493 <td class="parameter_annotations"> </td>
5498 <div class="refsect3">
5499 <a name="g-file-set-attributes-finish.returns"></a><h4>Returns</h4>
5500 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the attributes were set correctly, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
5504 <div class="refsect2">
5505 <a name="g-file-set-attribute-string"></a><h3>g_file_set_attribute_string ()</h3>
5506 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
5507 g_file_set_attribute_string (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5508 <em class="parameter"><code>const <span class="type">char</span> *attribute</code></em>,
5509 <em class="parameter"><code>const <span class="type">char</span> *value</code></em>,
5510 <em class="parameter"><code><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> flags</code></em>,
5511 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
5512 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
5513 <p>Sets <em class="parameter"><code>attribute</code></em>
5514 of type <a class="link" href="gio-GFileAttribute.html#G-FILE-ATTRIBUTE-TYPE-STRING:CAPS"><code class="literal">G_FILE_ATTRIBUTE_TYPE_STRING</code></a> to <em class="parameter"><code>value</code></em>
5516 If <em class="parameter"><code>attribute</code></em>
5517 is of a different type, this operation will fail.</p>
5518 <p>If <em class="parameter"><code>cancellable</code></em>
5519 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
5520 triggering the cancellable object from another thread. If the operation
5521 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 returned.</p>
5522 <div class="refsect3">
5523 <a name="g-file-set-attribute-string.parameters"></a><h4>Parameters</h4>
5524 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5526 <col width="150px" class="parameters_name">
5527 <col class="parameters_description">
5528 <col width="200px" class="parameters_annotations">
5532 <td class="parameter_name"><p>file</p></td>
5533 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
5534 <td class="parameter_annotations"> </td>
5537 <td class="parameter_name"><p>attribute</p></td>
5538 <td class="parameter_description"><p>a string containing the attribute's name</p></td>
5539 <td class="parameter_annotations"> </td>
5542 <td class="parameter_name"><p>value</p></td>
5543 <td class="parameter_description"><p>a string containing the attribute's value</p></td>
5544 <td class="parameter_annotations"> </td>
5547 <td class="parameter_name"><p>flags</p></td>
5548 <td class="parameter_description"><p><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a></p></td>
5549 <td class="parameter_annotations"> </td>
5552 <td class="parameter_name"><p>cancellable</p></td>
5553 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
5554 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
5555 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5558 <td class="parameter_name"><p>error</p></td>
5559 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
5560 <td class="parameter_annotations"> </td>
5565 <div class="refsect3">
5566 <a name="g-file-set-attribute-string.returns"></a><h4>Returns</h4>
5567 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>attribute</code></em>
5568 was successfully set, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
5572 <div class="refsect2">
5573 <a name="g-file-set-attribute-byte-string"></a><h3>g_file_set_attribute_byte_string ()</h3>
5574 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
5575 g_file_set_attribute_byte_string (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5576 <em class="parameter"><code>const <span class="type">char</span> *attribute</code></em>,
5577 <em class="parameter"><code>const <span class="type">char</span> *value</code></em>,
5578 <em class="parameter"><code><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> flags</code></em>,
5579 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
5580 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
5581 <p>Sets <em class="parameter"><code>attribute</code></em>
5582 of type <a class="link" href="gio-GFileAttribute.html#G-FILE-ATTRIBUTE-TYPE-BYTE-STRING:CAPS"><code class="literal">G_FILE_ATTRIBUTE_TYPE_BYTE_STRING</code></a> to <em class="parameter"><code>value</code></em>
5584 If <em class="parameter"><code>attribute</code></em>
5585 is of a different type, this operation will fail,
5586 returning <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
5587 <p>If <em class="parameter"><code>cancellable</code></em>
5588 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
5589 triggering the cancellable object from another thread. If the operation
5590 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 returned.</p>
5591 <div class="refsect3">
5592 <a name="g-file-set-attribute-byte-string.parameters"></a><h4>Parameters</h4>
5593 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5595 <col width="150px" class="parameters_name">
5596 <col class="parameters_description">
5597 <col width="200px" class="parameters_annotations">
5601 <td class="parameter_name"><p>file</p></td>
5602 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
5603 <td class="parameter_annotations"> </td>
5606 <td class="parameter_name"><p>attribute</p></td>
5607 <td class="parameter_description"><p>a string containing the attribute's name</p></td>
5608 <td class="parameter_annotations"> </td>
5611 <td class="parameter_name"><p>value</p></td>
5612 <td class="parameter_description"><p>a string containing the attribute's new value</p></td>
5613 <td class="parameter_annotations"> </td>
5616 <td class="parameter_name"><p>flags</p></td>
5617 <td class="parameter_description"><p>a <a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a></p></td>
5618 <td class="parameter_annotations"> </td>
5621 <td class="parameter_name"><p>cancellable</p></td>
5622 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
5623 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
5624 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5627 <td class="parameter_name"><p>error</p></td>
5628 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
5629 <td class="parameter_annotations"> </td>
5634 <div class="refsect3">
5635 <a name="g-file-set-attribute-byte-string.returns"></a><h4>Returns</h4>
5636 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>attribute</code></em>
5637 was successfully set to <em class="parameter"><code>value</code></em>
5638 in the <em class="parameter"><code>file</code></em>
5639 , <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
5643 <div class="refsect2">
5644 <a name="g-file-set-attribute-uint32"></a><h3>g_file_set_attribute_uint32 ()</h3>
5645 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
5646 g_file_set_attribute_uint32 (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5647 <em class="parameter"><code>const <span class="type">char</span> *attribute</code></em>,
5648 <em class="parameter"><code><a href="../glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> value</code></em>,
5649 <em class="parameter"><code><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> flags</code></em>,
5650 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
5651 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
5652 <p>Sets <em class="parameter"><code>attribute</code></em>
5653 of type <a class="link" href="gio-GFileAttribute.html#G-FILE-ATTRIBUTE-TYPE-UINT32:CAPS"><code class="literal">G_FILE_ATTRIBUTE_TYPE_UINT32</code></a> to <em class="parameter"><code>value</code></em>
5655 If <em class="parameter"><code>attribute</code></em>
5656 is of a different type, this operation will fail.</p>
5657 <p>If <em class="parameter"><code>cancellable</code></em>
5658 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
5659 triggering the cancellable object from another thread. If the operation
5660 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 returned.</p>
5661 <div class="refsect3">
5662 <a name="g-file-set-attribute-uint32.parameters"></a><h4>Parameters</h4>
5663 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5665 <col width="150px" class="parameters_name">
5666 <col class="parameters_description">
5667 <col width="200px" class="parameters_annotations">
5671 <td class="parameter_name"><p>file</p></td>
5672 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
5673 <td class="parameter_annotations"> </td>
5676 <td class="parameter_name"><p>attribute</p></td>
5677 <td class="parameter_description"><p>a string containing the attribute's name</p></td>
5678 <td class="parameter_annotations"> </td>
5681 <td class="parameter_name"><p>value</p></td>
5682 <td class="parameter_description"><p>a <a href="../glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> containing the attribute's new value</p></td>
5683 <td class="parameter_annotations"> </td>
5686 <td class="parameter_name"><p>flags</p></td>
5687 <td class="parameter_description"><p>a <a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a></p></td>
5688 <td class="parameter_annotations"> </td>
5691 <td class="parameter_name"><p>cancellable</p></td>
5692 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
5693 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
5694 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5697 <td class="parameter_name"><p>error</p></td>
5698 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
5699 <td class="parameter_annotations"> </td>
5704 <div class="refsect3">
5705 <a name="g-file-set-attribute-uint32.returns"></a><h4>Returns</h4>
5706 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>attribute</code></em>
5707 was successfully set to <em class="parameter"><code>value</code></em>
5708 in the <em class="parameter"><code>file</code></em>
5709 , <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
5713 <div class="refsect2">
5714 <a name="g-file-set-attribute-int32"></a><h3>g_file_set_attribute_int32 ()</h3>
5715 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
5716 g_file_set_attribute_int32 (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5717 <em class="parameter"><code>const <span class="type">char</span> *attribute</code></em>,
5718 <em class="parameter"><code><a href="../glib-Basic-Types.html#gint32"><span class="type">gint32</span></a> value</code></em>,
5719 <em class="parameter"><code><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> flags</code></em>,
5720 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
5721 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
5722 <p>Sets <em class="parameter"><code>attribute</code></em>
5723 of type <a class="link" href="gio-GFileAttribute.html#G-FILE-ATTRIBUTE-TYPE-INT32:CAPS"><code class="literal">G_FILE_ATTRIBUTE_TYPE_INT32</code></a> to <em class="parameter"><code>value</code></em>
5725 If <em class="parameter"><code>attribute</code></em>
5726 is of a different type, this operation will fail.</p>
5727 <p>If <em class="parameter"><code>cancellable</code></em>
5728 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
5729 triggering the cancellable object from another thread. If the operation
5730 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 returned.</p>
5731 <div class="refsect3">
5732 <a name="g-file-set-attribute-int32.parameters"></a><h4>Parameters</h4>
5733 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5735 <col width="150px" class="parameters_name">
5736 <col class="parameters_description">
5737 <col width="200px" class="parameters_annotations">
5741 <td class="parameter_name"><p>file</p></td>
5742 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
5743 <td class="parameter_annotations"> </td>
5746 <td class="parameter_name"><p>attribute</p></td>
5747 <td class="parameter_description"><p>a string containing the attribute's name</p></td>
5748 <td class="parameter_annotations"> </td>
5751 <td class="parameter_name"><p>value</p></td>
5752 <td class="parameter_description"><p>a <a href="../glib-Basic-Types.html#gint32"><span class="type">gint32</span></a> containing the attribute's new value</p></td>
5753 <td class="parameter_annotations"> </td>
5756 <td class="parameter_name"><p>flags</p></td>
5757 <td class="parameter_description"><p>a <a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a></p></td>
5758 <td class="parameter_annotations"> </td>
5761 <td class="parameter_name"><p>cancellable</p></td>
5762 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
5763 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
5764 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5767 <td class="parameter_name"><p>error</p></td>
5768 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
5769 <td class="parameter_annotations"> </td>
5774 <div class="refsect3">
5775 <a name="g-file-set-attribute-int32.returns"></a><h4>Returns</h4>
5776 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>attribute</code></em>
5777 was successfully set to <em class="parameter"><code>value</code></em>
5778 in the <em class="parameter"><code>file</code></em>
5779 , <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
5783 <div class="refsect2">
5784 <a name="g-file-set-attribute-uint64"></a><h3>g_file_set_attribute_uint64 ()</h3>
5785 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
5786 g_file_set_attribute_uint64 (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5787 <em class="parameter"><code>const <span class="type">char</span> *attribute</code></em>,
5788 <em class="parameter"><code><a href="../glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> value</code></em>,
5789 <em class="parameter"><code><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> flags</code></em>,
5790 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
5791 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
5792 <p>Sets <em class="parameter"><code>attribute</code></em>
5793 of type <a class="link" href="gio-GFileAttribute.html#G-FILE-ATTRIBUTE-TYPE-UINT64:CAPS"><code class="literal">G_FILE_ATTRIBUTE_TYPE_UINT64</code></a> to <em class="parameter"><code>value</code></em>
5795 If <em class="parameter"><code>attribute</code></em>
5796 is of a different type, this operation will fail.</p>
5797 <p>If <em class="parameter"><code>cancellable</code></em>
5798 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
5799 triggering the cancellable object from another thread. If the operation
5800 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 returned.</p>
5801 <div class="refsect3">
5802 <a name="g-file-set-attribute-uint64.parameters"></a><h4>Parameters</h4>
5803 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5805 <col width="150px" class="parameters_name">
5806 <col class="parameters_description">
5807 <col width="200px" class="parameters_annotations">
5811 <td class="parameter_name"><p>file</p></td>
5812 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
5813 <td class="parameter_annotations"> </td>
5816 <td class="parameter_name"><p>attribute</p></td>
5817 <td class="parameter_description"><p>a string containing the attribute's name</p></td>
5818 <td class="parameter_annotations"> </td>
5821 <td class="parameter_name"><p>value</p></td>
5822 <td class="parameter_description"><p>a <a href="../glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> containing the attribute's new value</p></td>
5823 <td class="parameter_annotations"> </td>
5826 <td class="parameter_name"><p>flags</p></td>
5827 <td class="parameter_description"><p>a <a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a></p></td>
5828 <td class="parameter_annotations"> </td>
5831 <td class="parameter_name"><p>cancellable</p></td>
5832 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
5833 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
5834 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5837 <td class="parameter_name"><p>error</p></td>
5838 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
5839 <td class="parameter_annotations"> </td>
5844 <div class="refsect3">
5845 <a name="g-file-set-attribute-uint64.returns"></a><h4>Returns</h4>
5846 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>attribute</code></em>
5847 was successfully set to <em class="parameter"><code>value</code></em>
5848 in the <em class="parameter"><code>file</code></em>
5849 , <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
5853 <div class="refsect2">
5854 <a name="g-file-set-attribute-int64"></a><h3>g_file_set_attribute_int64 ()</h3>
5855 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
5856 g_file_set_attribute_int64 (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5857 <em class="parameter"><code>const <span class="type">char</span> *attribute</code></em>,
5858 <em class="parameter"><code><a href="../glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> value</code></em>,
5859 <em class="parameter"><code><a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> flags</code></em>,
5860 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
5861 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
5862 <p>Sets <em class="parameter"><code>attribute</code></em>
5863 of type <a class="link" href="gio-GFileAttribute.html#G-FILE-ATTRIBUTE-TYPE-INT64:CAPS"><code class="literal">G_FILE_ATTRIBUTE_TYPE_INT64</code></a> to <em class="parameter"><code>value</code></em>
5865 If <em class="parameter"><code>attribute</code></em>
5866 is of a different type, this operation will fail.</p>
5867 <p>If <em class="parameter"><code>cancellable</code></em>
5868 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
5869 triggering the cancellable object from another thread. If the operation
5870 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 returned.</p>
5871 <div class="refsect3">
5872 <a name="g-file-set-attribute-int64.parameters"></a><h4>Parameters</h4>
5873 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5875 <col width="150px" class="parameters_name">
5876 <col class="parameters_description">
5877 <col width="200px" class="parameters_annotations">
5881 <td class="parameter_name"><p>file</p></td>
5882 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
5883 <td class="parameter_annotations"> </td>
5886 <td class="parameter_name"><p>attribute</p></td>
5887 <td class="parameter_description"><p>a string containing the attribute's name</p></td>
5888 <td class="parameter_annotations"> </td>
5891 <td class="parameter_name"><p>value</p></td>
5892 <td class="parameter_description"><p>a <a href="../glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> containing the attribute's new value</p></td>
5893 <td class="parameter_annotations"> </td>
5896 <td class="parameter_name"><p>flags</p></td>
5897 <td class="parameter_description"><p>a <a class="link" href="GFile.html#GFileQueryInfoFlags" title="enum GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a></p></td>
5898 <td class="parameter_annotations"> </td>
5901 <td class="parameter_name"><p>cancellable</p></td>
5902 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
5903 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
5904 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5907 <td class="parameter_name"><p>error</p></td>
5908 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
5909 <td class="parameter_annotations"> </td>
5914 <div class="refsect3">
5915 <a name="g-file-set-attribute-int64.returns"></a><h4>Returns</h4>
5916 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>attribute</code></em>
5917 was successfully set, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
5921 <div class="refsect2">
5922 <a name="g-file-mount-mountable"></a><h3>g_file_mount_mountable ()</h3>
5923 <pre class="programlisting"><span class="returnvalue">void</span>
5924 g_file_mount_mountable (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5925 <em class="parameter"><code><a class="link" href="GMount.html#GMountMountFlags" title="enum GMountMountFlags"><span class="type">GMountMountFlags</span></a> flags</code></em>,
5926 <em class="parameter"><code><a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> *mount_operation</code></em>,
5927 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
5928 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
5929 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
5930 <p>Mounts a file of type G_FILE_TYPE_MOUNTABLE.
5931 Using <em class="parameter"><code>mount_operation</code></em>
5932 , you can request callbacks when, for instance,
5933 passwords are needed during authentication.</p>
5934 <p>If <em class="parameter"><code>cancellable</code></em>
5935 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
5936 triggering the cancellable object from another thread. If the operation
5937 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 returned.</p>
5938 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
5940 You can then call <a class="link" href="GFile.html#g-file-mount-mountable-finish" title="g_file_mount_mountable_finish ()"><code class="function">g_file_mount_mountable_finish()</code></a> to get
5941 the result of the operation.</p>
5942 <div class="refsect3">
5943 <a name="g-file-mount-mountable.parameters"></a><h4>Parameters</h4>
5944 <div class="informaltable"><table class="informaltable" width="100%" border="0">
5946 <col width="150px" class="parameters_name">
5947 <col class="parameters_description">
5948 <col width="200px" class="parameters_annotations">
5952 <td class="parameter_name"><p>file</p></td>
5953 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
5954 <td class="parameter_annotations"> </td>
5957 <td class="parameter_name"><p>flags</p></td>
5958 <td class="parameter_description"><p>flags affecting the operation</p></td>
5959 <td class="parameter_annotations"> </td>
5962 <td class="parameter_name"><p>mount_operation</p></td>
5963 <td class="parameter_description"><p> a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>,
5964 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to avoid user interaction. </p></td>
5965 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5968 <td class="parameter_name"><p>cancellable</p></td>
5969 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
5970 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
5971 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5974 <td class="parameter_name"><p>callback</p></td>
5975 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
5976 when the request is satisfied, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
5977 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
5980 <td class="parameter_name"><p>user_data</p></td>
5981 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
5982 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
5989 <div class="refsect2">
5990 <a name="g-file-mount-mountable-finish"></a><h3>g_file_mount_mountable_finish ()</h3>
5991 <pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
5992 g_file_mount_mountable_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
5993 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
5994 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
5995 <p>Finishes a mount operation. See <a class="link" href="GFile.html#g-file-mount-mountable" title="g_file_mount_mountable ()"><code class="function">g_file_mount_mountable()</code></a> for details.</p>
5996 <p>Finish an asynchronous mount operation that was started
5997 with <a class="link" href="GFile.html#g-file-mount-mountable" title="g_file_mount_mountable ()"><code class="function">g_file_mount_mountable()</code></a>.</p>
5998 <div class="refsect3">
5999 <a name="g-file-mount-mountable-finish.parameters"></a><h4>Parameters</h4>
6000 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6002 <col width="150px" class="parameters_name">
6003 <col class="parameters_description">
6004 <col width="200px" class="parameters_annotations">
6008 <td class="parameter_name"><p>file</p></td>
6009 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6010 <td class="parameter_annotations"> </td>
6013 <td class="parameter_name"><p>result</p></td>
6014 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
6015 <td class="parameter_annotations"> </td>
6018 <td class="parameter_name"><p>error</p></td>
6019 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
6020 <td class="parameter_annotations"> </td>
6025 <div class="refsect3">
6026 <a name="g-file-mount-mountable-finish.returns"></a><h4>Returns</h4>
6027 <p> a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
6028 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
6029 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
6033 <div class="refsect2">
6034 <a name="g-file-unmount-mountable"></a><h3>g_file_unmount_mountable ()</h3>
6035 <pre class="programlisting"><span class="returnvalue">void</span>
6036 g_file_unmount_mountable (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6037 <em class="parameter"><code><a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags"><span class="type">GMountUnmountFlags</span></a> flags</code></em>,
6038 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
6039 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
6040 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
6041 <div class="warning">
6042 <p><code class="literal">g_file_unmount_mountable</code> has been deprecated since version 2.22 and should not be used in newly-written code.</p>
6043 <p>Use <a class="link" href="GFile.html#g-file-unmount-mountable-with-operation" title="g_file_unmount_mountable_with_operation ()"><code class="function">g_file_unmount_mountable_with_operation()</code></a> instead.</p>
6045 <p>Unmounts a file of type G_FILE_TYPE_MOUNTABLE.</p>
6046 <p>If <em class="parameter"><code>cancellable</code></em>
6047 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
6048 triggering the cancellable object from another thread. If the operation
6049 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 returned.</p>
6050 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
6052 You can then call <a class="link" href="GFile.html#g-file-unmount-mountable-finish" title="g_file_unmount_mountable_finish ()"><code class="function">g_file_unmount_mountable_finish()</code></a> to get
6053 the result of the operation.</p>
6054 <div class="refsect3">
6055 <a name="g-file-unmount-mountable.parameters"></a><h4>Parameters</h4>
6056 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6058 <col width="150px" class="parameters_name">
6059 <col class="parameters_description">
6060 <col width="200px" class="parameters_annotations">
6064 <td class="parameter_name"><p>file</p></td>
6065 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6066 <td class="parameter_annotations"> </td>
6069 <td class="parameter_name"><p>flags</p></td>
6070 <td class="parameter_description"><p>flags affecting the operation</p></td>
6071 <td class="parameter_annotations"> </td>
6074 <td class="parameter_name"><p>cancellable</p></td>
6075 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
6076 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
6077 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6080 <td class="parameter_name"><p>callback</p></td>
6081 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
6082 when the request is satisfied, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
6083 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6086 <td class="parameter_name"><p>user_data</p></td>
6087 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
6088 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
6095 <div class="refsect2">
6096 <a name="g-file-unmount-mountable-finish"></a><h3>g_file_unmount_mountable_finish ()</h3>
6097 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
6098 g_file_unmount_mountable_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6099 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
6100 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
6101 <div class="warning">
6102 <p><code class="literal">g_file_unmount_mountable_finish</code> has been deprecated since version 2.22 and should not be used in newly-written code.</p>
6103 <p>Use <a class="link" href="GFile.html#g-file-unmount-mountable-with-operation-finish" title="g_file_unmount_mountable_with_operation_finish ()"><code class="function">g_file_unmount_mountable_with_operation_finish()</code></a>
6106 <p>Finishes an unmount operation, see <a class="link" href="GFile.html#g-file-unmount-mountable" title="g_file_unmount_mountable ()"><code class="function">g_file_unmount_mountable()</code></a> for details.</p>
6107 <p>Finish an asynchronous unmount operation that was started
6108 with <a class="link" href="GFile.html#g-file-unmount-mountable" title="g_file_unmount_mountable ()"><code class="function">g_file_unmount_mountable()</code></a>.</p>
6109 <div class="refsect3">
6110 <a name="g-file-unmount-mountable-finish.parameters"></a><h4>Parameters</h4>
6111 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6113 <col width="150px" class="parameters_name">
6114 <col class="parameters_description">
6115 <col width="200px" class="parameters_annotations">
6119 <td class="parameter_name"><p>file</p></td>
6120 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6121 <td class="parameter_annotations"> </td>
6124 <td class="parameter_name"><p>result</p></td>
6125 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
6126 <td class="parameter_annotations"> </td>
6129 <td class="parameter_name"><p>error</p></td>
6130 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
6131 <td class="parameter_annotations"> </td>
6136 <div class="refsect3">
6137 <a name="g-file-unmount-mountable-finish.returns"></a><h4>Returns</h4>
6138 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation finished successfully.
6139 <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
6143 <div class="refsect2">
6144 <a name="g-file-unmount-mountable-with-operation"></a><h3>g_file_unmount_mountable_with_operation ()</h3>
6145 <pre class="programlisting"><span class="returnvalue">void</span>
6146 g_file_unmount_mountable_with_operation
6147 (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6148 <em class="parameter"><code><a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags"><span class="type">GMountUnmountFlags</span></a> flags</code></em>,
6149 <em class="parameter"><code><a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> *mount_operation</code></em>,
6150 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
6151 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
6152 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
6153 <p>Unmounts a file of type <a class="link" href="GFileInfo.html#G-FILE-TYPE-MOUNTABLE:CAPS"><span class="type">G_FILE_TYPE_MOUNTABLE</span></a>.</p>
6154 <p>If <em class="parameter"><code>cancellable</code></em>
6155 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
6156 triggering the cancellable object from another thread. If the operation
6157 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 returned.</p>
6158 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
6160 You can then call <a class="link" href="GFile.html#g-file-unmount-mountable-finish" title="g_file_unmount_mountable_finish ()"><code class="function">g_file_unmount_mountable_finish()</code></a> to get
6161 the result of the operation.</p>
6162 <div class="refsect3">
6163 <a name="g-file-unmount-mountable-with-operation.parameters"></a><h4>Parameters</h4>
6164 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6166 <col width="150px" class="parameters_name">
6167 <col class="parameters_description">
6168 <col width="200px" class="parameters_annotations">
6172 <td class="parameter_name"><p>file</p></td>
6173 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6174 <td class="parameter_annotations"> </td>
6177 <td class="parameter_name"><p>flags</p></td>
6178 <td class="parameter_description"><p>flags affecting the operation</p></td>
6179 <td class="parameter_annotations"> </td>
6182 <td class="parameter_name"><p>mount_operation</p></td>
6183 <td class="parameter_description"><p> a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>,
6184 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to avoid user interaction. </p></td>
6185 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6188 <td class="parameter_name"><p>cancellable</p></td>
6189 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
6190 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
6191 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6194 <td class="parameter_name"><p>callback</p></td>
6195 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
6196 when the request is satisfied, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
6197 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6200 <td class="parameter_name"><p>user_data</p></td>
6201 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
6202 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
6207 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
6210 <div class="refsect2">
6211 <a name="g-file-unmount-mountable-with-operation-finish"></a><h3>g_file_unmount_mountable_with_operation_finish ()</h3>
6212 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
6213 g_file_unmount_mountable_with_operation_finish
6214 (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6215 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
6216 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
6217 <p>Finishes an unmount operation,
6218 see <a class="link" href="GFile.html#g-file-unmount-mountable-with-operation" title="g_file_unmount_mountable_with_operation ()"><code class="function">g_file_unmount_mountable_with_operation()</code></a> for details.</p>
6219 <p>Finish an asynchronous unmount operation that was started
6220 with <a class="link" href="GFile.html#g-file-unmount-mountable-with-operation" title="g_file_unmount_mountable_with_operation ()"><code class="function">g_file_unmount_mountable_with_operation()</code></a>.</p>
6221 <div class="refsect3">
6222 <a name="g-file-unmount-mountable-with-operation-finish.parameters"></a><h4>Parameters</h4>
6223 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6225 <col width="150px" class="parameters_name">
6226 <col class="parameters_description">
6227 <col width="200px" class="parameters_annotations">
6231 <td class="parameter_name"><p>file</p></td>
6232 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6233 <td class="parameter_annotations"> </td>
6236 <td class="parameter_name"><p>result</p></td>
6237 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
6238 <td class="parameter_annotations"> </td>
6241 <td class="parameter_name"><p>error</p></td>
6242 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
6243 <td class="parameter_annotations"> </td>
6248 <div class="refsect3">
6249 <a name="g-file-unmount-mountable-with-operation-finish.returns"></a><h4>Returns</h4>
6250 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation finished successfully.
6251 <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
6253 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
6256 <div class="refsect2">
6257 <a name="g-file-eject-mountable"></a><h3>g_file_eject_mountable ()</h3>
6258 <pre class="programlisting"><span class="returnvalue">void</span>
6259 g_file_eject_mountable (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6260 <em class="parameter"><code><a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags"><span class="type">GMountUnmountFlags</span></a> flags</code></em>,
6261 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
6262 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
6263 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
6264 <div class="warning">
6265 <p><code class="literal">g_file_eject_mountable</code> has been deprecated since version 2.22 and should not be used in newly-written code.</p>
6266 <p>Use <a class="link" href="GFile.html#g-file-eject-mountable-with-operation" title="g_file_eject_mountable_with_operation ()"><code class="function">g_file_eject_mountable_with_operation()</code></a> instead.</p>
6268 <p>Starts an asynchronous eject on a mountable.
6269 When this operation has completed, <em class="parameter"><code>callback</code></em>
6271 <em class="parameter"><code>user_user</code></em>
6272 data, and the operation can be finalized with
6273 <a class="link" href="GFile.html#g-file-eject-mountable-finish" title="g_file_eject_mountable_finish ()"><code class="function">g_file_eject_mountable_finish()</code></a>.</p>
6274 <p>If <em class="parameter"><code>cancellable</code></em>
6275 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
6276 triggering the cancellable object from another thread. If the operation
6277 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 returned.</p>
6278 <div class="refsect3">
6279 <a name="g-file-eject-mountable.parameters"></a><h4>Parameters</h4>
6280 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6282 <col width="150px" class="parameters_name">
6283 <col class="parameters_description">
6284 <col width="200px" class="parameters_annotations">
6288 <td class="parameter_name"><p>file</p></td>
6289 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6290 <td class="parameter_annotations"> </td>
6293 <td class="parameter_name"><p>flags</p></td>
6294 <td class="parameter_description"><p>flags affecting the operation</p></td>
6295 <td class="parameter_annotations"> </td>
6298 <td class="parameter_name"><p>cancellable</p></td>
6299 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
6300 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
6301 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6304 <td class="parameter_name"><p>callback</p></td>
6305 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
6306 when the request is satisfied, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
6307 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6310 <td class="parameter_name"><p>user_data</p></td>
6311 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
6312 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
6319 <div class="refsect2">
6320 <a name="g-file-eject-mountable-finish"></a><h3>g_file_eject_mountable_finish ()</h3>
6321 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
6322 g_file_eject_mountable_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6323 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
6324 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
6325 <div class="warning">
6326 <p><code class="literal">g_file_eject_mountable_finish</code> has been deprecated since version 2.22 and should not be used in newly-written code.</p>
6327 <p>Use <a class="link" href="GFile.html#g-file-eject-mountable-with-operation-finish" title="g_file_eject_mountable_with_operation_finish ()"><code class="function">g_file_eject_mountable_with_operation_finish()</code></a>
6330 <p>Finishes an asynchronous eject operation started by
6331 <a class="link" href="GFile.html#g-file-eject-mountable" title="g_file_eject_mountable ()"><code class="function">g_file_eject_mountable()</code></a>.</p>
6332 <div class="refsect3">
6333 <a name="g-file-eject-mountable-finish.parameters"></a><h4>Parameters</h4>
6334 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6336 <col width="150px" class="parameters_name">
6337 <col class="parameters_description">
6338 <col width="200px" class="parameters_annotations">
6342 <td class="parameter_name"><p>file</p></td>
6343 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6344 <td class="parameter_annotations"> </td>
6347 <td class="parameter_name"><p>result</p></td>
6348 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
6349 <td class="parameter_annotations"> </td>
6352 <td class="parameter_name"><p>error</p></td>
6353 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
6354 <td class="parameter_annotations"> </td>
6359 <div class="refsect3">
6360 <a name="g-file-eject-mountable-finish.returns"></a><h4>Returns</h4>
6361 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>file</code></em>
6362 was ejected successfully.
6363 <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
6367 <div class="refsect2">
6368 <a name="g-file-eject-mountable-with-operation"></a><h3>g_file_eject_mountable_with_operation ()</h3>
6369 <pre class="programlisting"><span class="returnvalue">void</span>
6370 g_file_eject_mountable_with_operation (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6371 <em class="parameter"><code><a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags"><span class="type">GMountUnmountFlags</span></a> flags</code></em>,
6372 <em class="parameter"><code><a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> *mount_operation</code></em>,
6373 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
6374 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
6375 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
6376 <p>Starts an asynchronous eject on a mountable.
6377 When this operation has completed, <em class="parameter"><code>callback</code></em>
6379 <em class="parameter"><code>user_user</code></em>
6380 data, and the operation can be finalized with
6381 <a class="link" href="GFile.html#g-file-eject-mountable-with-operation-finish" title="g_file_eject_mountable_with_operation_finish ()"><code class="function">g_file_eject_mountable_with_operation_finish()</code></a>.</p>
6382 <p>If <em class="parameter"><code>cancellable</code></em>
6383 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
6384 triggering the cancellable object from another thread. If the operation
6385 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 returned.</p>
6386 <div class="refsect3">
6387 <a name="g-file-eject-mountable-with-operation.parameters"></a><h4>Parameters</h4>
6388 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6390 <col width="150px" class="parameters_name">
6391 <col class="parameters_description">
6392 <col width="200px" class="parameters_annotations">
6396 <td class="parameter_name"><p>file</p></td>
6397 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6398 <td class="parameter_annotations"> </td>
6401 <td class="parameter_name"><p>flags</p></td>
6402 <td class="parameter_description"><p>flags affecting the operation</p></td>
6403 <td class="parameter_annotations"> </td>
6406 <td class="parameter_name"><p>mount_operation</p></td>
6407 <td class="parameter_description"><p> a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>,
6408 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to avoid user interaction. </p></td>
6409 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6412 <td class="parameter_name"><p>cancellable</p></td>
6413 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
6414 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
6415 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6418 <td class="parameter_name"><p>callback</p></td>
6419 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
6420 when the request is satisfied, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
6421 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6424 <td class="parameter_name"><p>user_data</p></td>
6425 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
6426 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
6431 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
6434 <div class="refsect2">
6435 <a name="g-file-eject-mountable-with-operation-finish"></a><h3>g_file_eject_mountable_with_operation_finish ()</h3>
6436 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
6437 g_file_eject_mountable_with_operation_finish
6438 (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6439 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
6440 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
6441 <p>Finishes an asynchronous eject operation started by
6442 <a class="link" href="GFile.html#g-file-eject-mountable-with-operation" title="g_file_eject_mountable_with_operation ()"><code class="function">g_file_eject_mountable_with_operation()</code></a>.</p>
6443 <div class="refsect3">
6444 <a name="g-file-eject-mountable-with-operation-finish.parameters"></a><h4>Parameters</h4>
6445 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6447 <col width="150px" class="parameters_name">
6448 <col class="parameters_description">
6449 <col width="200px" class="parameters_annotations">
6453 <td class="parameter_name"><p>file</p></td>
6454 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6455 <td class="parameter_annotations"> </td>
6458 <td class="parameter_name"><p>result</p></td>
6459 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
6460 <td class="parameter_annotations"> </td>
6463 <td class="parameter_name"><p>error</p></td>
6464 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
6465 <td class="parameter_annotations"> </td>
6470 <div class="refsect3">
6471 <a name="g-file-eject-mountable-with-operation-finish.returns"></a><h4>Returns</h4>
6472 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>file</code></em>
6473 was ejected successfully.
6474 <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
6476 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
6479 <div class="refsect2">
6480 <a name="g-file-start-mountable"></a><h3>g_file_start_mountable ()</h3>
6481 <pre class="programlisting"><span class="returnvalue">void</span>
6482 g_file_start_mountable (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6483 <em class="parameter"><code><a class="link" href="GDrive.html#GDriveStartFlags" title="enum GDriveStartFlags"><span class="type">GDriveStartFlags</span></a> flags</code></em>,
6484 <em class="parameter"><code><a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> *start_operation</code></em>,
6485 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
6486 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
6487 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
6488 <p>Starts a file of type <a class="link" href="GFileInfo.html#G-FILE-TYPE-MOUNTABLE:CAPS"><span class="type">G_FILE_TYPE_MOUNTABLE</span></a>.
6489 Using <em class="parameter"><code>start_operation</code></em>
6490 , you can request callbacks when, for instance,
6491 passwords are needed during authentication.</p>
6492 <p>If <em class="parameter"><code>cancellable</code></em>
6493 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
6494 triggering the cancellable object from another thread. If the operation
6495 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 returned.</p>
6496 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
6498 You can then call <a class="link" href="GFile.html#g-file-mount-mountable-finish" title="g_file_mount_mountable_finish ()"><code class="function">g_file_mount_mountable_finish()</code></a> to get
6499 the result of the operation.</p>
6500 <div class="refsect3">
6501 <a name="g-file-start-mountable.parameters"></a><h4>Parameters</h4>
6502 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6504 <col width="150px" class="parameters_name">
6505 <col class="parameters_description">
6506 <col width="200px" class="parameters_annotations">
6510 <td class="parameter_name"><p>file</p></td>
6511 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6512 <td class="parameter_annotations"> </td>
6515 <td class="parameter_name"><p>flags</p></td>
6516 <td class="parameter_description"><p>flags affecting the operation</p></td>
6517 <td class="parameter_annotations"> </td>
6520 <td class="parameter_name"><p>start_operation</p></td>
6521 <td class="parameter_description"><p> a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to avoid user interaction. </p></td>
6522 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6525 <td class="parameter_name"><p>cancellable</p></td>
6526 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
6527 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6530 <td class="parameter_name"><p>callback</p></td>
6531 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
6532 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6535 <td class="parameter_name"><p>user_data</p></td>
6536 <td class="parameter_description"><p>the data to pass to callback function</p></td>
6537 <td class="parameter_annotations"> </td>
6542 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
6545 <div class="refsect2">
6546 <a name="g-file-start-mountable-finish"></a><h3>g_file_start_mountable_finish ()</h3>
6547 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
6548 g_file_start_mountable_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6549 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
6550 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
6551 <p>Finishes a start operation. See <a class="link" href="GFile.html#g-file-start-mountable" title="g_file_start_mountable ()"><code class="function">g_file_start_mountable()</code></a> for details.</p>
6552 <p>Finish an asynchronous start operation that was started
6553 with <a class="link" href="GFile.html#g-file-start-mountable" title="g_file_start_mountable ()"><code class="function">g_file_start_mountable()</code></a>.</p>
6554 <div class="refsect3">
6555 <a name="g-file-start-mountable-finish.parameters"></a><h4>Parameters</h4>
6556 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6558 <col width="150px" class="parameters_name">
6559 <col class="parameters_description">
6560 <col width="200px" class="parameters_annotations">
6564 <td class="parameter_name"><p>file</p></td>
6565 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6566 <td class="parameter_annotations"> </td>
6569 <td class="parameter_name"><p>result</p></td>
6570 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
6571 <td class="parameter_annotations"> </td>
6574 <td class="parameter_name"><p>error</p></td>
6575 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
6576 <td class="parameter_annotations"> </td>
6581 <div class="refsect3">
6582 <a name="g-file-start-mountable-finish.returns"></a><h4>Returns</h4>
6583 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation finished successfully. <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
6586 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
6589 <div class="refsect2">
6590 <a name="g-file-stop-mountable"></a><h3>g_file_stop_mountable ()</h3>
6591 <pre class="programlisting"><span class="returnvalue">void</span>
6592 g_file_stop_mountable (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6593 <em class="parameter"><code><a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags"><span class="type">GMountUnmountFlags</span></a> flags</code></em>,
6594 <em class="parameter"><code><a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> *mount_operation</code></em>,
6595 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
6596 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
6597 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
6598 <p>Stops a file of type <a class="link" href="GFileInfo.html#G-FILE-TYPE-MOUNTABLE:CAPS"><span class="type">G_FILE_TYPE_MOUNTABLE</span></a>.</p>
6599 <p>If <em class="parameter"><code>cancellable</code></em>
6600 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
6601 triggering the cancellable object from another thread. If the operation
6602 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 returned.</p>
6603 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
6605 You can then call <a class="link" href="GFile.html#g-file-stop-mountable-finish" title="g_file_stop_mountable_finish ()"><code class="function">g_file_stop_mountable_finish()</code></a> to get
6606 the result of the operation.</p>
6607 <div class="refsect3">
6608 <a name="g-file-stop-mountable.parameters"></a><h4>Parameters</h4>
6609 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6611 <col width="150px" class="parameters_name">
6612 <col class="parameters_description">
6613 <col width="200px" class="parameters_annotations">
6617 <td class="parameter_name"><p>file</p></td>
6618 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6619 <td class="parameter_annotations"> </td>
6622 <td class="parameter_name"><p>flags</p></td>
6623 <td class="parameter_description"><p>flags affecting the operation</p></td>
6624 <td class="parameter_annotations"> </td>
6627 <td class="parameter_name"><p>mount_operation</p></td>
6628 <td class="parameter_description"><p> a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>,
6629 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to avoid user interaction. </p></td>
6630 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6633 <td class="parameter_name"><p>cancellable</p></td>
6634 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
6635 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
6636 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6639 <td class="parameter_name"><p>callback</p></td>
6640 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
6641 when the request is satisfied, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
6642 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6645 <td class="parameter_name"><p>user_data</p></td>
6646 <td class="parameter_description"><p>the data to pass to callback function</p></td>
6647 <td class="parameter_annotations"> </td>
6652 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
6655 <div class="refsect2">
6656 <a name="g-file-stop-mountable-finish"></a><h3>g_file_stop_mountable_finish ()</h3>
6657 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
6658 g_file_stop_mountable_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6659 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
6660 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
6661 <p>Finishes an stop operation, see <a class="link" href="GFile.html#g-file-stop-mountable" title="g_file_stop_mountable ()"><code class="function">g_file_stop_mountable()</code></a> for details.</p>
6662 <p>Finish an asynchronous stop operation that was started
6663 with <a class="link" href="GFile.html#g-file-stop-mountable" title="g_file_stop_mountable ()"><code class="function">g_file_stop_mountable()</code></a>.</p>
6664 <div class="refsect3">
6665 <a name="g-file-stop-mountable-finish.parameters"></a><h4>Parameters</h4>
6666 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6668 <col width="150px" class="parameters_name">
6669 <col class="parameters_description">
6670 <col width="200px" class="parameters_annotations">
6674 <td class="parameter_name"><p>file</p></td>
6675 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6676 <td class="parameter_annotations"> </td>
6679 <td class="parameter_name"><p>result</p></td>
6680 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
6681 <td class="parameter_annotations"> </td>
6684 <td class="parameter_name"><p>error</p></td>
6685 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
6686 <td class="parameter_annotations"> </td>
6691 <div class="refsect3">
6692 <a name="g-file-stop-mountable-finish.returns"></a><h4>Returns</h4>
6693 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation finished successfully.
6694 <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
6696 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
6699 <div class="refsect2">
6700 <a name="g-file-poll-mountable"></a><h3>g_file_poll_mountable ()</h3>
6701 <pre class="programlisting"><span class="returnvalue">void</span>
6702 g_file_poll_mountable (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6703 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
6704 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
6705 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
6706 <p>Polls a file of type <a class="link" href="GFileInfo.html#G-FILE-TYPE-MOUNTABLE:CAPS"><span class="type">G_FILE_TYPE_MOUNTABLE</span></a>.</p>
6707 <p>If <em class="parameter"><code>cancellable</code></em>
6708 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
6709 triggering the cancellable object from another thread. If the operation
6710 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 returned.</p>
6711 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
6713 You can then call <a class="link" href="GFile.html#g-file-mount-mountable-finish" title="g_file_mount_mountable_finish ()"><code class="function">g_file_mount_mountable_finish()</code></a> to get
6714 the result of the operation.</p>
6715 <div class="refsect3">
6716 <a name="g-file-poll-mountable.parameters"></a><h4>Parameters</h4>
6717 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6719 <col width="150px" class="parameters_name">
6720 <col class="parameters_description">
6721 <col width="200px" class="parameters_annotations">
6725 <td class="parameter_name"><p>file</p></td>
6726 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6727 <td class="parameter_annotations"> </td>
6730 <td class="parameter_name"><p>cancellable</p></td>
6731 <td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore</p></td>
6732 <td class="parameter_annotations"> </td>
6735 <td class="parameter_name"><p>callback</p></td>
6736 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
6737 when the request is satisfied, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
6738 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6741 <td class="parameter_name"><p>user_data</p></td>
6742 <td class="parameter_description"><p>the data to pass to callback function</p></td>
6743 <td class="parameter_annotations"> </td>
6748 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
6751 <div class="refsect2">
6752 <a name="g-file-poll-mountable-finish"></a><h3>g_file_poll_mountable_finish ()</h3>
6753 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
6754 g_file_poll_mountable_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6755 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
6756 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
6757 <p>Finishes a poll operation. See <a class="link" href="GFile.html#g-file-poll-mountable" title="g_file_poll_mountable ()"><code class="function">g_file_poll_mountable()</code></a> for details.</p>
6758 <p>Finish an asynchronous poll operation that was polled
6759 with <a class="link" href="GFile.html#g-file-poll-mountable" title="g_file_poll_mountable ()"><code class="function">g_file_poll_mountable()</code></a>.</p>
6760 <div class="refsect3">
6761 <a name="g-file-poll-mountable-finish.parameters"></a><h4>Parameters</h4>
6762 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6764 <col width="150px" class="parameters_name">
6765 <col class="parameters_description">
6766 <col width="200px" class="parameters_annotations">
6770 <td class="parameter_name"><p>file</p></td>
6771 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6772 <td class="parameter_annotations"> </td>
6775 <td class="parameter_name"><p>result</p></td>
6776 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
6777 <td class="parameter_annotations"> </td>
6780 <td class="parameter_name"><p>error</p></td>
6781 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
6782 <td class="parameter_annotations"> </td>
6787 <div class="refsect3">
6788 <a name="g-file-poll-mountable-finish.returns"></a><h4>Returns</h4>
6789 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation finished successfully. <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
6792 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
6795 <div class="refsect2">
6796 <a name="g-file-mount-enclosing-volume"></a><h3>g_file_mount_enclosing_volume ()</h3>
6797 <pre class="programlisting"><span class="returnvalue">void</span>
6798 g_file_mount_enclosing_volume (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *location</code></em>,
6799 <em class="parameter"><code><a class="link" href="GMount.html#GMountMountFlags" title="enum GMountMountFlags"><span class="type">GMountMountFlags</span></a> flags</code></em>,
6800 <em class="parameter"><code><a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> *mount_operation</code></em>,
6801 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
6802 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
6803 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
6804 <p>Starts a <em class="parameter"><code>mount_operation</code></em>
6805 , mounting the volume that contains
6806 the file <em class="parameter"><code>location</code></em>
6808 <p>When this operation has completed, <em class="parameter"><code>callback</code></em>
6810 <em class="parameter"><code>user_user</code></em>
6811 data, and the operation can be finalized with
6812 <a class="link" href="GFile.html#g-file-mount-enclosing-volume-finish" title="g_file_mount_enclosing_volume_finish ()"><code class="function">g_file_mount_enclosing_volume_finish()</code></a>.</p>
6813 <p>If <em class="parameter"><code>cancellable</code></em>
6814 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
6815 triggering the cancellable object from another thread. If the operation
6816 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 returned.</p>
6817 <div class="refsect3">
6818 <a name="g-file-mount-enclosing-volume.parameters"></a><h4>Parameters</h4>
6819 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6821 <col width="150px" class="parameters_name">
6822 <col class="parameters_description">
6823 <col width="200px" class="parameters_annotations">
6827 <td class="parameter_name"><p>location</p></td>
6828 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6829 <td class="parameter_annotations"> </td>
6832 <td class="parameter_name"><p>flags</p></td>
6833 <td class="parameter_description"><p>flags affecting the operation</p></td>
6834 <td class="parameter_annotations"> </td>
6837 <td class="parameter_name"><p>mount_operation</p></td>
6838 <td class="parameter_description"><p> a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>
6839 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to avoid user interaction. </p></td>
6840 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6843 <td class="parameter_name"><p>cancellable</p></td>
6844 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
6845 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
6846 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6849 <td class="parameter_name"><p>callback</p></td>
6850 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
6851 when the request is satisfied, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
6852 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6855 <td class="parameter_name"><p>user_data</p></td>
6856 <td class="parameter_description"><p>the data to pass to callback function</p></td>
6857 <td class="parameter_annotations"> </td>
6864 <div class="refsect2">
6865 <a name="g-file-mount-enclosing-volume-finish"></a><h3>g_file_mount_enclosing_volume_finish ()</h3>
6866 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
6867 g_file_mount_enclosing_volume_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *location</code></em>,
6868 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
6869 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
6870 <p>Finishes a mount operation started by <a class="link" href="GFile.html#g-file-mount-enclosing-volume" title="g_file_mount_enclosing_volume ()"><code class="function">g_file_mount_enclosing_volume()</code></a>.</p>
6871 <div class="refsect3">
6872 <a name="g-file-mount-enclosing-volume-finish.parameters"></a><h4>Parameters</h4>
6873 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6875 <col width="150px" class="parameters_name">
6876 <col class="parameters_description">
6877 <col width="200px" class="parameters_annotations">
6881 <td class="parameter_name"><p>location</p></td>
6882 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6883 <td class="parameter_annotations"> </td>
6886 <td class="parameter_name"><p>result</p></td>
6887 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
6888 <td class="parameter_annotations"> </td>
6891 <td class="parameter_name"><p>error</p></td>
6892 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
6893 <td class="parameter_annotations"> </td>
6898 <div class="refsect3">
6899 <a name="g-file-mount-enclosing-volume-finish.returns"></a><h4>Returns</h4>
6900 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if successful. If an error has occurred,
6901 this function will return <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and set <em class="parameter"><code>error</code></em>
6902 appropriately if present.</p>
6906 <div class="refsect2">
6907 <a name="g-file-monitor-directory"></a><h3>g_file_monitor_directory ()</h3>
6908 <pre class="programlisting"><a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="returnvalue">GFileMonitor</span></a> *
6909 g_file_monitor_directory (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6910 <em class="parameter"><code><a class="link" href="GFile.html#GFileMonitorFlags" title="enum GFileMonitorFlags"><span class="type">GFileMonitorFlags</span></a> flags</code></em>,
6911 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
6912 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
6913 <p>Obtains a directory monitor for the given file.
6914 This may fail if directory monitoring is not supported.</p>
6915 <p>If <em class="parameter"><code>cancellable</code></em>
6916 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
6917 triggering the cancellable object from another thread. If the operation
6918 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 returned.</p>
6919 <p>It does not make sense for <em class="parameter"><code>flags</code></em>
6921 <a class="link" href="GFile.html#G-FILE-MONITOR-WATCH-HARD-LINKS:CAPS"><code class="literal">G_FILE_MONITOR_WATCH_HARD_LINKS</code></a>, since hard links can not be made to
6922 directories. It is not possible to monitor all the files in a
6923 directory for changes made via hard links; if you want to do this then
6924 you must register individual watches with <a class="link" href="GFile.html#g-file-monitor" title="g_file_monitor ()"><code class="function">g_file_monitor()</code></a>.</p>
6925 <p>Virtual: monitor_dir</p>
6926 <div class="refsect3">
6927 <a name="g-file-monitor-directory.parameters"></a><h4>Parameters</h4>
6928 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6930 <col width="150px" class="parameters_name">
6931 <col class="parameters_description">
6932 <col width="200px" class="parameters_annotations">
6936 <td class="parameter_name"><p>file</p></td>
6937 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
6938 <td class="parameter_annotations"> </td>
6941 <td class="parameter_name"><p>flags</p></td>
6942 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileMonitorFlags" title="enum GFileMonitorFlags"><span class="type">GFileMonitorFlags</span></a></p></td>
6943 <td class="parameter_annotations"> </td>
6946 <td class="parameter_name"><p>cancellable</p></td>
6947 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
6948 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
6949 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
6952 <td class="parameter_name"><p>error</p></td>
6953 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
6954 <td class="parameter_annotations"> </td>
6959 <div class="refsect3">
6960 <a name="g-file-monitor-directory.returns"></a><h4>Returns</h4>
6961 <p> a <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="type">GFileMonitor</span></a> for the given <em class="parameter"><code>file</code></em>
6963 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
6964 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
6965 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
6969 <div class="refsect2">
6970 <a name="g-file-monitor-file"></a><h3>g_file_monitor_file ()</h3>
6971 <pre class="programlisting"><a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="returnvalue">GFileMonitor</span></a> *
6972 g_file_monitor_file (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
6973 <em class="parameter"><code><a class="link" href="GFile.html#GFileMonitorFlags" title="enum GFileMonitorFlags"><span class="type">GFileMonitorFlags</span></a> flags</code></em>,
6974 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
6975 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
6976 <p>Obtains a file monitor for the given file. If no file notification
6977 mechanism exists, then regular polling of the file is used.</p>
6978 <p>If <em class="parameter"><code>cancellable</code></em>
6979 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
6980 triggering the cancellable object from another thread. If the operation
6981 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 returned.</p>
6982 <p>If <em class="parameter"><code>flags</code></em>
6983 contains <a class="link" href="GFile.html#G-FILE-MONITOR-WATCH-HARD-LINKS:CAPS"><code class="literal">G_FILE_MONITOR_WATCH_HARD_LINKS</code></a> then the monitor
6984 will also attempt to report changes made to the file via another
6985 filename (ie, a hard link). Without this flag, you can only rely on
6986 changes made through the filename contained in <em class="parameter"><code>file</code></em>
6988 reported. Using this flag may result in an increase in resource
6989 usage, and may not have any effect depending on the <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="type">GFileMonitor</span></a>
6990 backend and/or filesystem type.</p>
6991 <div class="refsect3">
6992 <a name="g-file-monitor-file.parameters"></a><h4>Parameters</h4>
6993 <div class="informaltable"><table class="informaltable" width="100%" border="0">
6995 <col width="150px" class="parameters_name">
6996 <col class="parameters_description">
6997 <col width="200px" class="parameters_annotations">
7001 <td class="parameter_name"><p>file</p></td>
7002 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
7003 <td class="parameter_annotations"> </td>
7006 <td class="parameter_name"><p>flags</p></td>
7007 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileMonitorFlags" title="enum GFileMonitorFlags"><span class="type">GFileMonitorFlags</span></a></p></td>
7008 <td class="parameter_annotations"> </td>
7011 <td class="parameter_name"><p>cancellable</p></td>
7012 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
7013 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
7014 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
7017 <td class="parameter_name"><p>error</p></td>
7018 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
7019 <td class="parameter_annotations"> </td>
7024 <div class="refsect3">
7025 <a name="g-file-monitor-file.returns"></a><h4>Returns</h4>
7026 <p> a <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="type">GFileMonitor</span></a> for the given <em class="parameter"><code>file</code></em>
7028 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
7029 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
7030 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
7034 <div class="refsect2">
7035 <a name="g-file-monitor"></a><h3>g_file_monitor ()</h3>
7036 <pre class="programlisting"><a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="returnvalue">GFileMonitor</span></a> *
7037 g_file_monitor (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
7038 <em class="parameter"><code><a class="link" href="GFile.html#GFileMonitorFlags" title="enum GFileMonitorFlags"><span class="type">GFileMonitorFlags</span></a> flags</code></em>,
7039 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
7040 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
7041 <p>Obtains a file or directory monitor for the given file,
7042 depending on the type of the file.</p>
7043 <p>If <em class="parameter"><code>cancellable</code></em>
7044 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
7045 triggering the cancellable object from another thread. If the operation
7046 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 returned.</p>
7047 <div class="refsect3">
7048 <a name="g-file-monitor.parameters"></a><h4>Parameters</h4>
7049 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7051 <col width="150px" class="parameters_name">
7052 <col class="parameters_description">
7053 <col width="200px" class="parameters_annotations">
7057 <td class="parameter_name"><p>file</p></td>
7058 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
7059 <td class="parameter_annotations"> </td>
7062 <td class="parameter_name"><p>flags</p></td>
7063 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileMonitorFlags" title="enum GFileMonitorFlags"><span class="type">GFileMonitorFlags</span></a></p></td>
7064 <td class="parameter_annotations"> </td>
7067 <td class="parameter_name"><p>cancellable</p></td>
7068 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
7069 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
7070 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
7073 <td class="parameter_name"><p>error</p></td>
7074 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
7075 <td class="parameter_annotations"> </td>
7080 <div class="refsect3">
7081 <a name="g-file-monitor.returns"></a><h4>Returns</h4>
7082 <p> a <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="type">GFileMonitor</span></a> for the given <em class="parameter"><code>file</code></em>
7084 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
7085 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
7086 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
7088 <p class="since">Since: <a class="link" href="api-index-2-18.html#api-index-2.18">2.18</a></p>
7091 <div class="refsect2">
7092 <a name="g-file-load-contents"></a><h3>g_file_load_contents ()</h3>
7093 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
7094 g_file_load_contents (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
7095 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
7096 <em class="parameter"><code><span class="type">char</span> **contents</code></em>,
7097 <em class="parameter"><code><a href="../glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *length</code></em>,
7098 <em class="parameter"><code><span class="type">char</span> **etag_out</code></em>,
7099 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
7100 <p>Loads the content of the file into memory. The data is always
7101 zero-terminated, but this is not included in the resultant <em class="parameter"><code>length</code></em>
7103 The returned <em class="parameter"><code>content</code></em>
7104 should be freed with <a href="../glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when no longer
7106 <p>If <em class="parameter"><code>cancellable</code></em>
7107 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
7108 triggering the cancellable object from another thread. If the operation
7109 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 returned.</p>
7110 <div class="refsect3">
7111 <a name="g-file-load-contents.parameters"></a><h4>Parameters</h4>
7112 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7114 <col width="150px" class="parameters_name">
7115 <col class="parameters_description">
7116 <col width="200px" class="parameters_annotations">
7120 <td class="parameter_name"><p>file</p></td>
7121 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
7122 <td class="parameter_annotations"> </td>
7125 <td class="parameter_name"><p>cancellable</p></td>
7126 <td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore</p></td>
7127 <td class="parameter_annotations"> </td>
7130 <td class="parameter_name"><p>contents</p></td>
7131 <td class="parameter_description"><p> a location to place the contents of the file. </p></td>
7132 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></td>
7135 <td class="parameter_name"><p>length</p></td>
7136 <td class="parameter_description"><p> a location to place the length of the contents of the file,
7137 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the length is not needed. </p></td>
7138 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
7141 <td class="parameter_name"><p>etag_out</p></td>
7142 <td class="parameter_description"><p> a location to place the current entity tag for the file,
7143 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the entity tag is not needed. </p></td>
7144 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
7147 <td class="parameter_name"><p>error</p></td>
7148 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
7149 <td class="parameter_annotations"> </td>
7154 <div class="refsect3">
7155 <a name="g-file-load-contents.returns"></a><h4>Returns</h4>
7156 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>file</code></em>
7157 's contents were successfully loaded.
7158 <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if there were errors.</p>
7162 <div class="refsect2">
7163 <a name="g-file-load-contents-async"></a><h3>g_file_load_contents_async ()</h3>
7164 <pre class="programlisting"><span class="returnvalue">void</span>
7165 g_file_load_contents_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
7166 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
7167 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
7168 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
7169 <p>Starts an asynchronous load of the <em class="parameter"><code>file</code></em>
7171 <p>For more details, see <a class="link" href="GFile.html#g-file-load-contents" title="g_file_load_contents ()"><code class="function">g_file_load_contents()</code></a> which is
7172 the synchronous version of this call.</p>
7173 <p>When the load operation has completed, <em class="parameter"><code>callback</code></em>
7175 with <em class="parameter"><code>user</code></em>
7176 data. To finish the operation, call
7177 <a class="link" href="GFile.html#g-file-load-contents-finish" title="g_file_load_contents_finish ()"><code class="function">g_file_load_contents_finish()</code></a> with the <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> returned by
7178 the <em class="parameter"><code>callback</code></em>
7180 <p>If <em class="parameter"><code>cancellable</code></em>
7181 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
7182 triggering the cancellable object from another thread. If the operation
7183 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 returned.</p>
7184 <div class="refsect3">
7185 <a name="g-file-load-contents-async.parameters"></a><h4>Parameters</h4>
7186 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7188 <col width="150px" class="parameters_name">
7189 <col class="parameters_description">
7190 <col width="200px" class="parameters_annotations">
7194 <td class="parameter_name"><p>file</p></td>
7195 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
7196 <td class="parameter_annotations"> </td>
7199 <td class="parameter_name"><p>cancellable</p></td>
7200 <td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore</p></td>
7201 <td class="parameter_annotations"> </td>
7204 <td class="parameter_name"><p>callback</p></td>
7205 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied</p></td>
7206 <td class="parameter_annotations"> </td>
7209 <td class="parameter_name"><p>user_data</p></td>
7210 <td class="parameter_description"><p>the data to pass to callback function</p></td>
7211 <td class="parameter_annotations"> </td>
7218 <div class="refsect2">
7219 <a name="g-file-load-contents-finish"></a><h3>g_file_load_contents_finish ()</h3>
7220 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
7221 g_file_load_contents_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
7222 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
7223 <em class="parameter"><code><span class="type">char</span> **contents</code></em>,
7224 <em class="parameter"><code><a href="../glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *length</code></em>,
7225 <em class="parameter"><code><span class="type">char</span> **etag_out</code></em>,
7226 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
7227 <p>Finishes an asynchronous load of the <em class="parameter"><code>file</code></em>
7229 The contents are placed in <em class="parameter"><code>contents</code></em>
7230 , and <em class="parameter"><code>length</code></em>
7232 size of the <em class="parameter"><code>contents</code></em>
7233 string. The <em class="parameter"><code>content</code></em>
7234 should be freed with
7235 <a href="../glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when no longer needed. If <em class="parameter"><code>etag_out</code></em>
7236 is present, it will be
7237 set to the new entity tag for the <em class="parameter"><code>file</code></em>
7239 <div class="refsect3">
7240 <a name="g-file-load-contents-finish.parameters"></a><h4>Parameters</h4>
7241 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7243 <col width="150px" class="parameters_name">
7244 <col class="parameters_description">
7245 <col width="200px" class="parameters_annotations">
7249 <td class="parameter_name"><p>file</p></td>
7250 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
7251 <td class="parameter_annotations"> </td>
7254 <td class="parameter_name"><p>res</p></td>
7255 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
7256 <td class="parameter_annotations"> </td>
7259 <td class="parameter_name"><p>contents</p></td>
7260 <td class="parameter_description"><p> a location to place the contents of the file. </p></td>
7261 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></td>
7264 <td class="parameter_name"><p>length</p></td>
7265 <td class="parameter_description"><p> a location to place the length of the contents of the file,
7266 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the length is not needed. </p></td>
7267 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
7270 <td class="parameter_name"><p>etag_out</p></td>
7271 <td class="parameter_description"><p> a location to place the current entity tag for the file,
7272 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the entity tag is not needed. </p></td>
7273 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
7276 <td class="parameter_name"><p>error</p></td>
7277 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
7278 <td class="parameter_annotations"> </td>
7283 <div class="refsect3">
7284 <a name="g-file-load-contents-finish.returns"></a><h4>Returns</h4>
7285 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the load was successful. If <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and <em class="parameter"><code>error</code></em>
7287 present, it will be set appropriately.</p>
7291 <div class="refsect2">
7292 <a name="g-file-load-partial-contents-async"></a><h3>g_file_load_partial_contents_async ()</h3>
7293 <pre class="programlisting"><span class="returnvalue">void</span>
7294 g_file_load_partial_contents_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
7295 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
7296 <em class="parameter"><code><a class="link" href="GFile.html#GFileReadMoreCallback" title="GFileReadMoreCallback ()"><span class="type">GFileReadMoreCallback</span></a> read_more_callback</code></em>,
7297 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
7298 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
7299 <p>Reads the partial contents of a file. A <a class="link" href="GFile.html#GFileReadMoreCallback" title="GFileReadMoreCallback ()"><span class="type">GFileReadMoreCallback</span></a> should
7300 be used to stop reading from the file when appropriate, else this
7301 function will behave exactly as <a class="link" href="GFile.html#g-file-load-contents-async" title="g_file_load_contents_async ()"><code class="function">g_file_load_contents_async()</code></a>. This
7302 operation can be finished by <a class="link" href="GFile.html#g-file-load-partial-contents-finish" title="g_file_load_partial_contents_finish ()"><code class="function">g_file_load_partial_contents_finish()</code></a>.</p>
7303 <p>Users of this function should be aware that <em class="parameter"><code>user_data</code></em>
7305 both the <em class="parameter"><code>read_more_callback</code></em>
7306 and the <em class="parameter"><code>callback</code></em>
7308 <p>If <em class="parameter"><code>cancellable</code></em>
7309 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
7310 triggering the cancellable object from another thread. If the operation
7311 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 returned.</p>
7312 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
7313 <div class="refsect3">
7314 <a name="g-file-load-partial-contents-async.parameters"></a><h4>Parameters</h4>
7315 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7317 <col width="150px" class="parameters_name">
7318 <col class="parameters_description">
7319 <col width="200px" class="parameters_annotations">
7323 <td class="parameter_name"><p>file</p></td>
7324 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
7325 <td class="parameter_annotations"> </td>
7328 <td class="parameter_name"><p>cancellable</p></td>
7329 <td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore</p></td>
7330 <td class="parameter_annotations"> </td>
7333 <td class="parameter_name"><p>read_more_callback</p></td>
7334 <td class="parameter_description"><p>a <a class="link" href="GFile.html#GFileReadMoreCallback" title="GFileReadMoreCallback ()"><span class="type">GFileReadMoreCallback</span></a> to receive partial data
7335 and to specify whether further data should be read</p></td>
7336 <td class="parameter_annotations"> </td>
7339 <td class="parameter_name"><p>callback</p></td>
7340 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied</p></td>
7341 <td class="parameter_annotations"> </td>
7344 <td class="parameter_name"><p>user_data</p></td>
7345 <td class="parameter_description"><p>the data to pass to the callback functions</p></td>
7346 <td class="parameter_annotations"> </td>
7353 <div class="refsect2">
7354 <a name="g-file-load-partial-contents-finish"></a><h3>g_file_load_partial_contents_finish ()</h3>
7355 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
7356 g_file_load_partial_contents_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
7357 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
7358 <em class="parameter"><code><span class="type">char</span> **contents</code></em>,
7359 <em class="parameter"><code><a href="../glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *length</code></em>,
7360 <em class="parameter"><code><span class="type">char</span> **etag_out</code></em>,
7361 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
7362 <p>Finishes an asynchronous partial load operation that was started
7363 with <a class="link" href="GFile.html#g-file-load-partial-contents-async" title="g_file_load_partial_contents_async ()"><code class="function">g_file_load_partial_contents_async()</code></a>. The data is always
7364 zero-terminated, but this is not included in the resultant <em class="parameter"><code>length</code></em>
7366 The returned <em class="parameter"><code>content</code></em>
7367 should be freed with <a href="../glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when no longer
7369 <div class="refsect3">
7370 <a name="g-file-load-partial-contents-finish.parameters"></a><h4>Parameters</h4>
7371 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7373 <col width="150px" class="parameters_name">
7374 <col class="parameters_description">
7375 <col width="200px" class="parameters_annotations">
7379 <td class="parameter_name"><p>file</p></td>
7380 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
7381 <td class="parameter_annotations"> </td>
7384 <td class="parameter_name"><p>res</p></td>
7385 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
7386 <td class="parameter_annotations"> </td>
7389 <td class="parameter_name"><p>contents</p></td>
7390 <td class="parameter_description"><p> a location to place the contents of the file. </p></td>
7391 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></td>
7394 <td class="parameter_name"><p>length</p></td>
7395 <td class="parameter_description"><p> a location to place the length of the contents of the file,
7396 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the length is not needed. </p></td>
7397 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
7400 <td class="parameter_name"><p>etag_out</p></td>
7401 <td class="parameter_description"><p> a location to place the current entity tag for the file,
7402 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the entity tag is not needed. </p></td>
7403 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
7406 <td class="parameter_name"><p>error</p></td>
7407 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
7408 <td class="parameter_annotations"> </td>
7413 <div class="refsect3">
7414 <a name="g-file-load-partial-contents-finish.returns"></a><h4>Returns</h4>
7415 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the load was successful. If <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and <em class="parameter"><code>error</code></em>
7417 present, it will be set appropriately.</p>
7421 <div class="refsect2">
7422 <a name="g-file-replace-contents"></a><h3>g_file_replace_contents ()</h3>
7423 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
7424 g_file_replace_contents (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
7425 <em class="parameter"><code>const <span class="type">char</span> *contents</code></em>,
7426 <em class="parameter"><code><a href="../glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>,
7427 <em class="parameter"><code>const <span class="type">char</span> *etag</code></em>,
7428 <em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> make_backup</code></em>,
7429 <em class="parameter"><code><a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a> flags</code></em>,
7430 <em class="parameter"><code><span class="type">char</span> **new_etag</code></em>,
7431 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
7432 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
7433 <p>Replaces the contents of <em class="parameter"><code>file</code></em>
7434 with <em class="parameter"><code>contents</code></em>
7435 of <em class="parameter"><code>length</code></em>
7437 <p>If <em class="parameter"><code>etag</code></em>
7438 is specified (not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>), any existing file must have that etag,
7439 or the error <a class="link" href="gio-GIOError.html#G-IO-ERROR-WRONG-ETAG:CAPS"><code class="literal">G_IO_ERROR_WRONG_ETAG</code></a> will be returned.</p>
7440 <p>If <em class="parameter"><code>make_backup</code></em>
7441 is <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, this function will attempt to make a backup
7442 of <em class="parameter"><code>file</code></em>
7443 . Internally, it uses <a class="link" href="GFile.html#g-file-replace" title="g_file_replace ()"><code class="function">g_file_replace()</code></a>, so will try to replace the
7444 file contents in the safest way possible. For example, atomic renames are
7445 used when replacing local files’ contents.</p>
7446 <p>If <em class="parameter"><code>cancellable</code></em>
7447 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
7448 triggering the cancellable object from another thread. If the operation
7449 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 returned.</p>
7450 <p>The returned <em class="parameter"><code>new_etag</code></em>
7451 can be used to verify that the file hasn't
7452 changed the next time it is saved over.</p>
7453 <div class="refsect3">
7454 <a name="g-file-replace-contents.parameters"></a><h4>Parameters</h4>
7455 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7457 <col width="150px" class="parameters_name">
7458 <col class="parameters_description">
7459 <col width="200px" class="parameters_annotations">
7463 <td class="parameter_name"><p>file</p></td>
7464 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
7465 <td class="parameter_annotations"> </td>
7468 <td class="parameter_name"><p>contents</p></td>
7469 <td class="parameter_description"><p> a string containing the new contents for <em class="parameter"><code>file</code></em>
7471 <td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></td>
7474 <td class="parameter_name"><p>length</p></td>
7475 <td class="parameter_description"><p>the length of <em class="parameter"><code>contents</code></em>
7477 <td class="parameter_annotations"> </td>
7480 <td class="parameter_name"><p>etag</p></td>
7481 <td class="parameter_description"><p> the old <a class="link" href="GFile.html#gfile-etag" title="Entity Tags">entity-tag</a> for the document,
7482 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
7483 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
7486 <td class="parameter_name"><p>make_backup</p></td>
7487 <td class="parameter_description"><p><a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if a backup should be created</p></td>
7488 <td class="parameter_annotations"> </td>
7491 <td class="parameter_name"><p>flags</p></td>
7492 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a></p></td>
7493 <td class="parameter_annotations"> </td>
7496 <td class="parameter_name"><p>new_etag</p></td>
7497 <td class="parameter_description"><p> a location to a new <a class="link" href="GFile.html#gfile-etag" title="Entity Tags">entity tag</a>
7498 for the document. This should be freed with <a href="../glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when no longer
7499 needed, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
7500 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
7503 <td class="parameter_name"><p>cancellable</p></td>
7504 <td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore</p></td>
7505 <td class="parameter_annotations"> </td>
7508 <td class="parameter_name"><p>error</p></td>
7509 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
7510 <td class="parameter_annotations"> </td>
7515 <div class="refsect3">
7516 <a name="g-file-replace-contents.returns"></a><h4>Returns</h4>
7517 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if successful. If an error has occurred, this function
7518 will return <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and set <em class="parameter"><code>error</code></em>
7519 appropriately if present.</p>
7523 <div class="refsect2">
7524 <a name="g-file-replace-contents-async"></a><h3>g_file_replace_contents_async ()</h3>
7525 <pre class="programlisting"><span class="returnvalue">void</span>
7526 g_file_replace_contents_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
7527 <em class="parameter"><code>const <span class="type">char</span> *contents</code></em>,
7528 <em class="parameter"><code><a href="../glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>,
7529 <em class="parameter"><code>const <span class="type">char</span> *etag</code></em>,
7530 <em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> make_backup</code></em>,
7531 <em class="parameter"><code><a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a> flags</code></em>,
7532 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
7533 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
7534 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
7535 <p>Starts an asynchronous replacement of <em class="parameter"><code>file</code></em>
7537 <em class="parameter"><code>contents</code></em>
7538 of <em class="parameter"><code>length</code></em>
7539 bytes. <em class="parameter"><code>etag</code></em>
7540 will replace the document's
7541 current entity tag.</p>
7542 <p>When this operation has completed, <em class="parameter"><code>callback</code></em>
7544 <em class="parameter"><code>user_user</code></em>
7545 data, and the operation can be finalized with
7546 <a class="link" href="GFile.html#g-file-replace-contents-finish" title="g_file_replace_contents_finish ()"><code class="function">g_file_replace_contents_finish()</code></a>.</p>
7547 <p>If <em class="parameter"><code>cancellable</code></em>
7548 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
7549 triggering the cancellable object from another thread. If the operation
7550 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 returned.</p>
7551 <p>If <em class="parameter"><code>make_backup</code></em>
7552 is <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, this function will attempt to
7553 make a backup of <em class="parameter"><code>file</code></em>
7555 <p>Note that no copy of <em class="parameter"><code>content</code></em>
7556 will be made, so it must stay valid
7557 until <em class="parameter"><code>callback</code></em>
7558 is called. See <a class="link" href="GFile.html#g-file-replace-contents-bytes-async" title="g_file_replace_contents_bytes_async ()"><code class="function">g_file_replace_contents_bytes_async()</code></a>
7559 for a <a href="../glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> version that will automatically hold a reference to the
7560 contents (without copying) for the duration of the call.</p>
7561 <div class="refsect3">
7562 <a name="g-file-replace-contents-async.parameters"></a><h4>Parameters</h4>
7563 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7565 <col width="150px" class="parameters_name">
7566 <col class="parameters_description">
7567 <col width="200px" class="parameters_annotations">
7571 <td class="parameter_name"><p>file</p></td>
7572 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
7573 <td class="parameter_annotations"> </td>
7576 <td class="parameter_name"><p>contents</p></td>
7577 <td class="parameter_description"><p> string of contents to replace the file with. </p></td>
7578 <td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></td>
7581 <td class="parameter_name"><p>length</p></td>
7582 <td class="parameter_description"><p>the length of <em class="parameter"><code>contents</code></em>
7584 <td class="parameter_annotations"> </td>
7587 <td class="parameter_name"><p>etag</p></td>
7588 <td class="parameter_description"><p> a new <a class="link" href="GFile.html#gfile-etag" title="Entity Tags">entity tag</a> for the <em class="parameter"><code>file</code></em>
7589 , or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
7590 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
7593 <td class="parameter_name"><p>make_backup</p></td>
7594 <td class="parameter_description"><p><a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if a backup should be created</p></td>
7595 <td class="parameter_annotations"> </td>
7598 <td class="parameter_name"><p>flags</p></td>
7599 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a></p></td>
7600 <td class="parameter_annotations"> </td>
7603 <td class="parameter_name"><p>cancellable</p></td>
7604 <td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore</p></td>
7605 <td class="parameter_annotations"> </td>
7608 <td class="parameter_name"><p>callback</p></td>
7609 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied</p></td>
7610 <td class="parameter_annotations"> </td>
7613 <td class="parameter_name"><p>user_data</p></td>
7614 <td class="parameter_description"><p>the data to pass to callback function</p></td>
7615 <td class="parameter_annotations"> </td>
7622 <div class="refsect2">
7623 <a name="g-file-replace-contents-bytes-async"></a><h3>g_file_replace_contents_bytes_async ()</h3>
7624 <pre class="programlisting"><span class="returnvalue">void</span>
7625 g_file_replace_contents_bytes_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
7626 <em class="parameter"><code><a href="../glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> *contents</code></em>,
7627 <em class="parameter"><code>const <span class="type">char</span> *etag</code></em>,
7628 <em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> make_backup</code></em>,
7629 <em class="parameter"><code><a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a> flags</code></em>,
7630 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
7631 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
7632 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
7633 <p>Same as <a class="link" href="GFile.html#g-file-replace-contents-async" title="g_file_replace_contents_async ()"><code class="function">g_file_replace_contents_async()</code></a> but takes a <a href="../glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> input instead.
7634 This function will keep a ref on <em class="parameter"><code>contents</code></em>
7635 until the operation is done.
7636 Unlike <a class="link" href="GFile.html#g-file-replace-contents-async" title="g_file_replace_contents_async ()"><code class="function">g_file_replace_contents_async()</code></a> this allows forgetting about the
7637 content without waiting for the callback.</p>
7638 <p>When this operation has completed, <em class="parameter"><code>callback</code></em>
7640 <em class="parameter"><code>user_user</code></em>
7641 data, and the operation can be finalized with
7642 <a class="link" href="GFile.html#g-file-replace-contents-finish" title="g_file_replace_contents_finish ()"><code class="function">g_file_replace_contents_finish()</code></a>.</p>
7643 <div class="refsect3">
7644 <a name="g-file-replace-contents-bytes-async.parameters"></a><h4>Parameters</h4>
7645 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7647 <col width="150px" class="parameters_name">
7648 <col class="parameters_description">
7649 <col width="200px" class="parameters_annotations">
7653 <td class="parameter_name"><p>file</p></td>
7654 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
7655 <td class="parameter_annotations"> </td>
7658 <td class="parameter_name"><p>contents</p></td>
7659 <td class="parameter_description"><p>a <a href="../glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a></p></td>
7660 <td class="parameter_annotations"> </td>
7663 <td class="parameter_name"><p>etag</p></td>
7664 <td class="parameter_description"><p> a new <a class="link" href="GFile.html#gfile-etag" title="Entity Tags">entity tag</a> for the <em class="parameter"><code>file</code></em>
7665 , or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
7666 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
7669 <td class="parameter_name"><p>make_backup</p></td>
7670 <td class="parameter_description"><p><a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if a backup should be created</p></td>
7671 <td class="parameter_annotations"> </td>
7674 <td class="parameter_name"><p>flags</p></td>
7675 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a></p></td>
7676 <td class="parameter_annotations"> </td>
7679 <td class="parameter_name"><p>cancellable</p></td>
7680 <td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore</p></td>
7681 <td class="parameter_annotations"> </td>
7684 <td class="parameter_name"><p>callback</p></td>
7685 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied</p></td>
7686 <td class="parameter_annotations"> </td>
7689 <td class="parameter_name"><p>user_data</p></td>
7690 <td class="parameter_description"><p>the data to pass to callback function</p></td>
7691 <td class="parameter_annotations"> </td>
7696 <p class="since">Since: <a class="link" href="api-index-2-40.html#api-index-2.40">2.40</a></p>
7699 <div class="refsect2">
7700 <a name="g-file-replace-contents-finish"></a><h3>g_file_replace_contents_finish ()</h3>
7701 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
7702 g_file_replace_contents_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
7703 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
7704 <em class="parameter"><code><span class="type">char</span> **new_etag</code></em>,
7705 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
7706 <p>Finishes an asynchronous replace of the given <em class="parameter"><code>file</code></em>
7708 <a class="link" href="GFile.html#g-file-replace-contents-async" title="g_file_replace_contents_async ()"><code class="function">g_file_replace_contents_async()</code></a>. Sets <em class="parameter"><code>new_etag</code></em>
7710 tag for the document, if present.</p>
7711 <div class="refsect3">
7712 <a name="g-file-replace-contents-finish.parameters"></a><h4>Parameters</h4>
7713 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7715 <col width="150px" class="parameters_name">
7716 <col class="parameters_description">
7717 <col width="200px" class="parameters_annotations">
7721 <td class="parameter_name"><p>file</p></td>
7722 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
7723 <td class="parameter_annotations"> </td>
7726 <td class="parameter_name"><p>res</p></td>
7727 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
7728 <td class="parameter_annotations"> </td>
7731 <td class="parameter_name"><p>new_etag</p></td>
7732 <td class="parameter_description"><p> a location of a new <a class="link" href="GFile.html#gfile-etag" title="Entity Tags">entity tag</a>
7733 for the document. This should be freed with <a href="../glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when it is no
7734 longer needed, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
7735 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
7738 <td class="parameter_name"><p>error</p></td>
7739 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
7740 <td class="parameter_annotations"> </td>
7745 <div class="refsect3">
7746 <a name="g-file-replace-contents-finish.returns"></a><h4>Returns</h4>
7747 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure.</p>
7751 <div class="refsect2">
7752 <a name="g-file-copy-attributes"></a><h3>g_file_copy_attributes ()</h3>
7753 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
7754 g_file_copy_attributes (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *source</code></em>,
7755 <em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *destination</code></em>,
7756 <em class="parameter"><code><a class="link" href="GFile.html#GFileCopyFlags" title="enum GFileCopyFlags"><span class="type">GFileCopyFlags</span></a> flags</code></em>,
7757 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
7758 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
7759 <p>Copies the file attributes from <em class="parameter"><code>source</code></em>
7760 to <em class="parameter"><code>destination</code></em>
7762 <p>Normally only a subset of the file attributes are copied,
7763 those that are copies in a normal file copy operation
7764 (which for instance does not include e.g. owner). However
7765 if <a class="link" href="GFile.html#G-FILE-COPY-ALL-METADATA:CAPS"><span class="type">G_FILE_COPY_ALL_METADATA</span></a> is specified in <em class="parameter"><code>flags</code></em>
7767 all the metadata that is possible to copy is copied. This
7768 is useful when implementing move by copy + delete source.</p>
7769 <div class="refsect3">
7770 <a name="g-file-copy-attributes.parameters"></a><h4>Parameters</h4>
7771 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7773 <col width="150px" class="parameters_name">
7774 <col class="parameters_description">
7775 <col width="200px" class="parameters_annotations">
7779 <td class="parameter_name"><p>source</p></td>
7780 <td class="parameter_description"><p>a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> with attributes</p></td>
7781 <td class="parameter_annotations"> </td>
7784 <td class="parameter_name"><p>destination</p></td>
7785 <td class="parameter_description"><p>a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> to copy attributes to</p></td>
7786 <td class="parameter_annotations"> </td>
7789 <td class="parameter_name"><p>flags</p></td>
7790 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileCopyFlags" title="enum GFileCopyFlags"><span class="type">GFileCopyFlags</span></a></p></td>
7791 <td class="parameter_annotations"> </td>
7794 <td class="parameter_name"><p>cancellable</p></td>
7795 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
7796 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
7797 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
7800 <td class="parameter_name"><p>error</p></td>
7801 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore</p></td>
7802 <td class="parameter_annotations"> </td>
7807 <div class="refsect3">
7808 <a name="g-file-copy-attributes.returns"></a><h4>Returns</h4>
7809 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the attributes were copied successfully,
7810 <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
7814 <div class="refsect2">
7815 <a name="g-file-create-readwrite"></a><h3>g_file_create_readwrite ()</h3>
7816 <pre class="programlisting"><a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="returnvalue">GFileIOStream</span></a> *
7817 g_file_create_readwrite (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
7818 <em class="parameter"><code><a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a> flags</code></em>,
7819 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
7820 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
7821 <p>Creates a new file and returns a stream for reading and
7822 writing to it. The file must not already exist.</p>
7823 <p>By default files created are generally readable by everyone,
7824 but if you pass <a class="link" href="GFile.html#G-FILE-CREATE-PRIVATE:CAPS"><span class="type">G_FILE_CREATE_PRIVATE</span></a> in <em class="parameter"><code>flags</code></em>
7826 will be made readable only to the current user, to the level
7827 that is supported on the target filesystem.</p>
7828 <p>If <em class="parameter"><code>cancellable</code></em>
7829 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled
7830 by triggering the cancellable object from another thread. If the
7831 operation 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
7833 <p>If a file or directory with this name already exists, the
7834 <a class="link" href="gio-GIOError.html#G-IO-ERROR-EXISTS:CAPS"><code class="literal">G_IO_ERROR_EXISTS</code></a> error will be returned. Some file systems don't
7835 allow all file names, and may return an <a class="link" href="gio-GIOError.html#G-IO-ERROR-INVALID-FILENAME:CAPS"><code class="literal">G_IO_ERROR_INVALID_FILENAME</code></a>
7836 error, and if the name is too long, <a class="link" href="gio-GIOError.html#G-IO-ERROR-FILENAME-TOO-LONG:CAPS"><code class="literal">G_IO_ERROR_FILENAME_TOO_LONG</code></a>
7837 will be returned. Other errors are possible too, and depend on what
7838 kind of filesystem the file is on.</p>
7839 <p>Note that in many non-local file cases read and write streams are
7840 not supported, so make sure you really need to do read and write
7841 streaming, rather than just opening for reading or writing.</p>
7842 <div class="refsect3">
7843 <a name="g-file-create-readwrite.parameters"></a><h4>Parameters</h4>
7844 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7846 <col width="150px" class="parameters_name">
7847 <col class="parameters_description">
7848 <col width="200px" class="parameters_annotations">
7852 <td class="parameter_name"><p>file</p></td>
7853 <td class="parameter_description"><p>a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
7854 <td class="parameter_annotations"> </td>
7857 <td class="parameter_name"><p>flags</p></td>
7858 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a></p></td>
7859 <td class="parameter_annotations"> </td>
7862 <td class="parameter_name"><p>cancellable</p></td>
7863 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
7864 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
7865 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
7868 <td class="parameter_name"><p>error</p></td>
7869 <td class="parameter_description"><p>return location for a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
7870 <td class="parameter_annotations"> </td>
7875 <div class="refsect3">
7876 <a name="g-file-create-readwrite.returns"></a><h4>Returns</h4>
7877 <p> a <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a> for the newly created
7878 file, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
7879 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
7880 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
7882 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
7885 <div class="refsect2">
7886 <a name="g-file-create-readwrite-async"></a><h3>g_file_create_readwrite_async ()</h3>
7887 <pre class="programlisting"><span class="returnvalue">void</span>
7888 g_file_create_readwrite_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
7889 <em class="parameter"><code><a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a> flags</code></em>,
7890 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
7891 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
7892 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
7893 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
7894 <p>Asynchronously creates a new file and returns a stream
7895 for reading and writing to it. The file must not already exist.</p>
7896 <p>For more details, see <a class="link" href="GFile.html#g-file-create-readwrite" title="g_file_create_readwrite ()"><code class="function">g_file_create_readwrite()</code></a> which is
7897 the synchronous version of this call.</p>
7898 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
7900 You can then call <a class="link" href="GFile.html#g-file-create-readwrite-finish" title="g_file_create_readwrite_finish ()"><code class="function">g_file_create_readwrite_finish()</code></a> to get
7901 the result of the operation.</p>
7902 <div class="refsect3">
7903 <a name="g-file-create-readwrite-async.parameters"></a><h4>Parameters</h4>
7904 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7906 <col width="150px" class="parameters_name">
7907 <col class="parameters_description">
7908 <col width="200px" class="parameters_annotations">
7912 <td class="parameter_name"><p>file</p></td>
7913 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
7914 <td class="parameter_annotations"> </td>
7917 <td class="parameter_name"><p>flags</p></td>
7918 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a></p></td>
7919 <td class="parameter_annotations"> </td>
7922 <td class="parameter_name"><p>io_priority</p></td>
7923 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
7924 <td class="parameter_annotations"> </td>
7927 <td class="parameter_name"><p>cancellable</p></td>
7928 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
7929 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
7930 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
7933 <td class="parameter_name"><p>callback</p></td>
7934 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
7935 when the request is satisfied. </p></td>
7936 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
7939 <td class="parameter_name"><p>user_data</p></td>
7940 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
7941 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
7946 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
7949 <div class="refsect2">
7950 <a name="g-file-create-readwrite-finish"></a><h3>g_file_create_readwrite_finish ()</h3>
7951 <pre class="programlisting"><a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="returnvalue">GFileIOStream</span></a> *
7952 g_file_create_readwrite_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
7953 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
7954 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
7955 <p>Finishes an asynchronous file create operation started with
7956 <a class="link" href="GFile.html#g-file-create-readwrite-async" title="g_file_create_readwrite_async ()"><code class="function">g_file_create_readwrite_async()</code></a>.</p>
7957 <div class="refsect3">
7958 <a name="g-file-create-readwrite-finish.parameters"></a><h4>Parameters</h4>
7959 <div class="informaltable"><table class="informaltable" width="100%" border="0">
7961 <col width="150px" class="parameters_name">
7962 <col class="parameters_description">
7963 <col width="200px" class="parameters_annotations">
7967 <td class="parameter_name"><p>file</p></td>
7968 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
7969 <td class="parameter_annotations"> </td>
7972 <td class="parameter_name"><p>res</p></td>
7973 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
7974 <td class="parameter_annotations"> </td>
7977 <td class="parameter_name"><p>error</p></td>
7978 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
7979 <td class="parameter_annotations"> </td>
7984 <div class="refsect3">
7985 <a name="g-file-create-readwrite-finish.returns"></a><h4>Returns</h4>
7986 <p> a <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
7987 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
7988 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
7990 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
7993 <div class="refsect2">
7994 <a name="g-file-open-readwrite"></a><h3>g_file_open_readwrite ()</h3>
7995 <pre class="programlisting"><a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="returnvalue">GFileIOStream</span></a> *
7996 g_file_open_readwrite (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
7997 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
7998 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
7999 <p>Opens an existing file for reading and writing. The result is
8000 a <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a> that can be used to read and write the contents
8002 <p>If <em class="parameter"><code>cancellable</code></em>
8003 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled
8004 by triggering the cancellable object from another thread. If the
8005 operation 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
8007 <p>If the file does not exist, the <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-FOUND:CAPS"><code class="literal">G_IO_ERROR_NOT_FOUND</code></a> error will
8008 be returned. If the file is a directory, the <a class="link" href="gio-GIOError.html#G-IO-ERROR-IS-DIRECTORY:CAPS"><code class="literal">G_IO_ERROR_IS_DIRECTORY</code></a>
8009 error will be returned. Other errors are possible too, and depend on
8010 what kind of filesystem the file is on. Note that in many non-local
8011 file cases read and write streams are not supported, so make sure you
8012 really need to do read and write streaming, rather than just opening
8013 for reading or writing.</p>
8014 <div class="refsect3">
8015 <a name="g-file-open-readwrite.parameters"></a><h4>Parameters</h4>
8016 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8018 <col width="150px" class="parameters_name">
8019 <col class="parameters_description">
8020 <col width="200px" class="parameters_annotations">
8024 <td class="parameter_name"><p>file</p></td>
8025 <td class="parameter_description"><p><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> to open</p></td>
8026 <td class="parameter_annotations"> </td>
8029 <td class="parameter_name"><p>cancellable</p></td>
8030 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>. </p></td>
8031 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
8034 <td class="parameter_name"><p>error</p></td>
8035 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
8036 <td class="parameter_annotations"> </td>
8041 <div class="refsect3">
8042 <a name="g-file-open-readwrite.returns"></a><h4>Returns</h4>
8043 <p> <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
8044 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
8045 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
8047 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
8050 <div class="refsect2">
8051 <a name="g-file-open-readwrite-async"></a><h3>g_file_open_readwrite_async ()</h3>
8052 <pre class="programlisting"><span class="returnvalue">void</span>
8053 g_file_open_readwrite_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
8054 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
8055 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
8056 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
8057 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
8058 <p>Asynchronously opens <em class="parameter"><code>file</code></em>
8059 for reading and writing.</p>
8060 <p>For more details, see <a class="link" href="GFile.html#g-file-open-readwrite" title="g_file_open_readwrite ()"><code class="function">g_file_open_readwrite()</code></a> which is
8061 the synchronous version of this call.</p>
8062 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
8064 You can then call <a class="link" href="GFile.html#g-file-open-readwrite-finish" title="g_file_open_readwrite_finish ()"><code class="function">g_file_open_readwrite_finish()</code></a> to get
8065 the result of the operation.</p>
8066 <div class="refsect3">
8067 <a name="g-file-open-readwrite-async.parameters"></a><h4>Parameters</h4>
8068 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8070 <col width="150px" class="parameters_name">
8071 <col class="parameters_description">
8072 <col width="200px" class="parameters_annotations">
8076 <td class="parameter_name"><p>file</p></td>
8077 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
8078 <td class="parameter_annotations"> </td>
8081 <td class="parameter_name"><p>io_priority</p></td>
8082 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
8083 <td class="parameter_annotations"> </td>
8086 <td class="parameter_name"><p>cancellable</p></td>
8087 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
8088 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
8089 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
8092 <td class="parameter_name"><p>callback</p></td>
8093 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
8094 when the request is satisfied. </p></td>
8095 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
8098 <td class="parameter_name"><p>user_data</p></td>
8099 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
8100 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
8105 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
8108 <div class="refsect2">
8109 <a name="g-file-open-readwrite-finish"></a><h3>g_file_open_readwrite_finish ()</h3>
8110 <pre class="programlisting"><a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="returnvalue">GFileIOStream</span></a> *
8111 g_file_open_readwrite_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
8112 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
8113 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
8114 <p>Finishes an asynchronous file read operation started with
8115 <a class="link" href="GFile.html#g-file-open-readwrite-async" title="g_file_open_readwrite_async ()"><code class="function">g_file_open_readwrite_async()</code></a>.</p>
8116 <div class="refsect3">
8117 <a name="g-file-open-readwrite-finish.parameters"></a><h4>Parameters</h4>
8118 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8120 <col width="150px" class="parameters_name">
8121 <col class="parameters_description">
8122 <col width="200px" class="parameters_annotations">
8126 <td class="parameter_name"><p>file</p></td>
8127 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
8128 <td class="parameter_annotations"> </td>
8131 <td class="parameter_name"><p>res</p></td>
8132 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
8133 <td class="parameter_annotations"> </td>
8136 <td class="parameter_name"><p>error</p></td>
8137 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
8138 <td class="parameter_annotations"> </td>
8143 <div class="refsect3">
8144 <a name="g-file-open-readwrite-finish.returns"></a><h4>Returns</h4>
8145 <p> a <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
8146 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
8147 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
8149 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
8152 <div class="refsect2">
8153 <a name="g-file-replace-readwrite"></a><h3>g_file_replace_readwrite ()</h3>
8154 <pre class="programlisting"><a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="returnvalue">GFileIOStream</span></a> *
8155 g_file_replace_readwrite (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
8156 <em class="parameter"><code>const <span class="type">char</span> *etag</code></em>,
8157 <em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> make_backup</code></em>,
8158 <em class="parameter"><code><a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a> flags</code></em>,
8159 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
8160 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
8161 <p>Returns an output stream for overwriting the file in readwrite mode,
8162 possibly creating a backup copy of the file first. If the file doesn't
8163 exist, it will be created.</p>
8164 <p>For details about the behaviour, see <a class="link" href="GFile.html#g-file-replace" title="g_file_replace ()"><code class="function">g_file_replace()</code></a> which does the
8165 same thing but returns an output stream only.</p>
8166 <p>Note that in many non-local file cases read and write streams are not
8167 supported, so make sure you really need to do read and write streaming,
8168 rather than just opening for reading or writing.</p>
8169 <div class="refsect3">
8170 <a name="g-file-replace-readwrite.parameters"></a><h4>Parameters</h4>
8171 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8173 <col width="150px" class="parameters_name">
8174 <col class="parameters_description">
8175 <col width="200px" class="parameters_annotations">
8179 <td class="parameter_name"><p>file</p></td>
8180 <td class="parameter_description"><p>a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
8181 <td class="parameter_annotations"> </td>
8184 <td class="parameter_name"><p>etag</p></td>
8185 <td class="parameter_description"><p> an optional <a class="link" href="GFile.html#gfile-etag" title="Entity Tags">entity tag</a>
8186 for the current <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> to ignore. </p></td>
8187 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
8190 <td class="parameter_name"><p>make_backup</p></td>
8191 <td class="parameter_description"><p><a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if a backup should be created</p></td>
8192 <td class="parameter_annotations"> </td>
8195 <td class="parameter_name"><p>flags</p></td>
8196 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a></p></td>
8197 <td class="parameter_annotations"> </td>
8200 <td class="parameter_name"><p>cancellable</p></td>
8201 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
8202 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
8203 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
8206 <td class="parameter_name"><p>error</p></td>
8207 <td class="parameter_description"><p>return location for a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
8208 <td class="parameter_annotations"> </td>
8213 <div class="refsect3">
8214 <a name="g-file-replace-readwrite.returns"></a><h4>Returns</h4>
8215 <p> a <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
8216 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
8217 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
8219 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
8222 <div class="refsect2">
8223 <a name="g-file-replace-readwrite-async"></a><h3>g_file_replace_readwrite_async ()</h3>
8224 <pre class="programlisting"><span class="returnvalue">void</span>
8225 g_file_replace_readwrite_async (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
8226 <em class="parameter"><code>const <span class="type">char</span> *etag</code></em>,
8227 <em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> make_backup</code></em>,
8228 <em class="parameter"><code><a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a> flags</code></em>,
8229 <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
8230 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
8231 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
8232 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
8233 <p>Asynchronously overwrites the file in read-write mode,
8234 replacing the contents, possibly creating a backup copy
8235 of the file first.</p>
8236 <p>For more details, see <a class="link" href="GFile.html#g-file-replace-readwrite" title="g_file_replace_readwrite ()"><code class="function">g_file_replace_readwrite()</code></a> which is
8237 the synchronous version of this call.</p>
8238 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
8240 You can then call <a class="link" href="GFile.html#g-file-replace-readwrite-finish" title="g_file_replace_readwrite_finish ()"><code class="function">g_file_replace_readwrite_finish()</code></a> to get
8241 the result of the operation.</p>
8242 <div class="refsect3">
8243 <a name="g-file-replace-readwrite-async.parameters"></a><h4>Parameters</h4>
8244 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8246 <col width="150px" class="parameters_name">
8247 <col class="parameters_description">
8248 <col width="200px" class="parameters_annotations">
8252 <td class="parameter_name"><p>file</p></td>
8253 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
8254 <td class="parameter_annotations"> </td>
8257 <td class="parameter_name"><p>etag</p></td>
8258 <td class="parameter_description"><p> an <a class="link" href="GFile.html#gfile-etag" title="Entity Tags">entity tag</a> for the current <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>,
8259 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
8260 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
8263 <td class="parameter_name"><p>make_backup</p></td>
8264 <td class="parameter_description"><p><a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if a backup should be created</p></td>
8265 <td class="parameter_annotations"> </td>
8268 <td class="parameter_name"><p>flags</p></td>
8269 <td class="parameter_description"><p>a set of <a class="link" href="GFile.html#GFileCreateFlags" title="enum GFileCreateFlags"><span class="type">GFileCreateFlags</span></a></p></td>
8270 <td class="parameter_annotations"> </td>
8273 <td class="parameter_name"><p>io_priority</p></td>
8274 <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
8275 <td class="parameter_annotations"> </td>
8278 <td class="parameter_name"><p>cancellable</p></td>
8279 <td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object,
8280 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
8281 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
8284 <td class="parameter_name"><p>callback</p></td>
8285 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call
8286 when the request is satisfied. </p></td>
8287 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
8290 <td class="parameter_name"><p>user_data</p></td>
8291 <td class="parameter_description"><p> the data to pass to callback function. </p></td>
8292 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
8297 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
8300 <div class="refsect2">
8301 <a name="g-file-replace-readwrite-finish"></a><h3>g_file_replace_readwrite_finish ()</h3>
8302 <pre class="programlisting"><a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="returnvalue">GFileIOStream</span></a> *
8303 g_file_replace_readwrite_finish (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>,
8304 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
8305 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
8306 <p>Finishes an asynchronous file replace operation started with
8307 <a class="link" href="GFile.html#g-file-replace-readwrite-async" title="g_file_replace_readwrite_async ()"><code class="function">g_file_replace_readwrite_async()</code></a>.</p>
8308 <div class="refsect3">
8309 <a name="g-file-replace-readwrite-finish.parameters"></a><h4>Parameters</h4>
8310 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8312 <col width="150px" class="parameters_name">
8313 <col class="parameters_description">
8314 <col width="200px" class="parameters_annotations">
8318 <td class="parameter_name"><p>file</p></td>
8319 <td class="parameter_description"><p>input <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
8320 <td class="parameter_annotations"> </td>
8323 <td class="parameter_name"><p>res</p></td>
8324 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td>
8325 <td class="parameter_annotations"> </td>
8328 <td class="parameter_name"><p>error</p></td>
8329 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
8330 <td class="parameter_annotations"> </td>
8335 <div class="refsect3">
8336 <a name="g-file-replace-readwrite-finish.returns"></a><h4>Returns</h4>
8337 <p> a <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
8338 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
8339 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
8341 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
8344 <div class="refsect2">
8345 <a name="g-file-supports-thread-contexts"></a><h3>g_file_supports_thread_contexts ()</h3>
8346 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
8347 g_file_supports_thread_contexts (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *file</code></em>);</pre>
8348 <p>Checks if <em class="parameter"><code>file</code></em>
8350 thread-default contexts.
8351 If this returns <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, you cannot perform asynchronous operations on
8352 <em class="parameter"><code>file</code></em>
8353 in a thread that has a thread-default context.</p>
8354 <div class="refsect3">
8355 <a name="g-file-supports-thread-contexts.parameters"></a><h4>Parameters</h4>
8356 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8358 <col width="150px" class="parameters_name">
8359 <col class="parameters_description">
8360 <col width="200px" class="parameters_annotations">
8363 <td class="parameter_name"><p>file</p></td>
8364 <td class="parameter_description"><p>a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a></p></td>
8365 <td class="parameter_annotations"> </td>
8369 <div class="refsect3">
8370 <a name="g-file-supports-thread-contexts.returns"></a><h4>Returns</h4>
8371 <p> Whether or not <em class="parameter"><code>file</code></em>
8372 supports thread-default contexts.</p>
8374 <p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
8377 <div class="refsect1">
8378 <a name="GFile.other_details"></a><h2>Types and Values</h2>
8379 <div class="refsect2">
8380 <a name="GFile-struct"></a><h3>GFile</h3>
8381 <pre class="programlisting">typedef struct _GFile GFile;</pre>
8382 <p>A handle to an object implementing the <a class="link" href="GFile.html#GFileIface" title="struct GFileIface"><span class="type">GFileIface</span></a> interface.
8383 Generally stores a location within the file system. Handles do not
8384 necessarily represent files or directories that currently exist.</p>
8387 <div class="refsect2">
8388 <a name="GFileIface"></a><h3>struct GFileIface</h3>
8389 <pre class="programlisting">struct GFileIface {
8390 GTypeInterface g_iface;
8394 GFile * (* dup) (GFile *file);
8395 guint (* hash) (GFile *file);
8396 gboolean (* equal) (GFile *file1,
8398 gboolean (* is_native) (GFile *file);
8399 gboolean (* has_uri_scheme) (GFile *file,
8400 const char *uri_scheme);
8401 char * (* get_uri_scheme) (GFile *file);
8402 char * (* get_basename) (GFile *file);
8403 char * (* get_path) (GFile *file);
8404 char * (* get_uri) (GFile *file);
8405 char * (* get_parse_name) (GFile *file);
8406 GFile * (* get_parent) (GFile *file);
8407 gboolean (* prefix_matches) (GFile *prefix,
8409 char * (* get_relative_path) (GFile *parent,
8411 GFile * (* resolve_relative_path) (GFile *file,
8412 const char *relative_path);
8413 GFile * (* get_child_for_display_name) (GFile *file,
8414 const char *display_name,
8417 GFileEnumerator * (* enumerate_children) (GFile *file,
8418 const char *attributes,
8419 GFileQueryInfoFlags flags,
8420 GCancellable *cancellable,
8422 void (* enumerate_children_async) (GFile *file,
8423 const char *attributes,
8424 GFileQueryInfoFlags flags,
8426 GCancellable *cancellable,
8427 GAsyncReadyCallback callback,
8428 gpointer user_data);
8429 GFileEnumerator * (* enumerate_children_finish) (GFile *file,
8433 GFileInfo * (* query_info) (GFile *file,
8434 const char *attributes,
8435 GFileQueryInfoFlags flags,
8436 GCancellable *cancellable,
8438 void (* query_info_async) (GFile *file,
8439 const char *attributes,
8440 GFileQueryInfoFlags flags,
8442 GCancellable *cancellable,
8443 GAsyncReadyCallback callback,
8444 gpointer user_data);
8445 GFileInfo * (* query_info_finish) (GFile *file,
8449 GFileInfo * (* query_filesystem_info) (GFile *file,
8450 const char *attributes,
8451 GCancellable *cancellable,
8453 void (* query_filesystem_info_async) (GFile *file,
8454 const char *attributes,
8456 GCancellable *cancellable,
8457 GAsyncReadyCallback callback,
8458 gpointer user_data);
8459 GFileInfo * (* query_filesystem_info_finish)(GFile *file,
8463 GMount * (* find_enclosing_mount) (GFile *file,
8464 GCancellable *cancellable,
8466 void (* find_enclosing_mount_async) (GFile *file,
8468 GCancellable *cancellable,
8469 GAsyncReadyCallback callback,
8470 gpointer user_data);
8471 GMount * (* find_enclosing_mount_finish) (GFile *file,
8475 GFile * (* set_display_name) (GFile *file,
8476 const char *display_name,
8477 GCancellable *cancellable,
8479 void (* set_display_name_async) (GFile *file,
8480 const char *display_name,
8482 GCancellable *cancellable,
8483 GAsyncReadyCallback callback,
8484 gpointer user_data);
8485 GFile * (* set_display_name_finish) (GFile *file,
8489 GFileAttributeInfoList * (* query_settable_attributes) (GFile *file,
8490 GCancellable *cancellable,
8492 void (* _query_settable_attributes_async) (void);
8493 void (* _query_settable_attributes_finish) (void);
8495 GFileAttributeInfoList * (* query_writable_namespaces) (GFile *file,
8496 GCancellable *cancellable,
8498 void (* _query_writable_namespaces_async) (void);
8499 void (* _query_writable_namespaces_finish) (void);
8501 gboolean (* set_attribute) (GFile *file,
8502 const char *attribute,
8503 GFileAttributeType type,
8505 GFileQueryInfoFlags flags,
8506 GCancellable *cancellable,
8508 gboolean (* set_attributes_from_info) (GFile *file,
8510 GFileQueryInfoFlags flags,
8511 GCancellable *cancellable,
8513 void (* set_attributes_async) (GFile *file,
8515 GFileQueryInfoFlags flags,
8517 GCancellable *cancellable,
8518 GAsyncReadyCallback callback,
8519 gpointer user_data);
8520 gboolean (* set_attributes_finish) (GFile *file,
8521 GAsyncResult *result,
8525 GFileInputStream * (* read_fn) (GFile *file,
8526 GCancellable *cancellable,
8528 void (* read_async) (GFile *file,
8530 GCancellable *cancellable,
8531 GAsyncReadyCallback callback,
8532 gpointer user_data);
8533 GFileInputStream * (* read_finish) (GFile *file,
8537 GFileOutputStream * (* append_to) (GFile *file,
8538 GFileCreateFlags flags,
8539 GCancellable *cancellable,
8541 void (* append_to_async) (GFile *file,
8542 GFileCreateFlags flags,
8544 GCancellable *cancellable,
8545 GAsyncReadyCallback callback,
8546 gpointer user_data);
8547 GFileOutputStream * (* append_to_finish) (GFile *file,
8551 GFileOutputStream * (* create) (GFile *file,
8552 GFileCreateFlags flags,
8553 GCancellable *cancellable,
8555 void (* create_async) (GFile *file,
8556 GFileCreateFlags flags,
8558 GCancellable *cancellable,
8559 GAsyncReadyCallback callback,
8560 gpointer user_data);
8561 GFileOutputStream * (* create_finish) (GFile *file,
8565 GFileOutputStream * (* replace) (GFile *file,
8567 gboolean make_backup,
8568 GFileCreateFlags flags,
8569 GCancellable *cancellable,
8571 void (* replace_async) (GFile *file,
8573 gboolean make_backup,
8574 GFileCreateFlags flags,
8576 GCancellable *cancellable,
8577 GAsyncReadyCallback callback,
8578 gpointer user_data);
8579 GFileOutputStream * (* replace_finish) (GFile *file,
8583 gboolean (* delete_file) (GFile *file,
8584 GCancellable *cancellable,
8586 void (* delete_file_async) (GFile *file,
8588 GCancellable *cancellable,
8589 GAsyncReadyCallback callback,
8590 gpointer user_data);
8591 gboolean (* delete_file_finish) (GFile *file,
8592 GAsyncResult *result,
8595 gboolean (* trash) (GFile *file,
8596 GCancellable *cancellable,
8598 void (* trash_async) (GFile *file,
8600 GCancellable *cancellable,
8601 GAsyncReadyCallback callback,
8602 gpointer user_data);
8603 gboolean (* trash_finish) (GFile *file,
8604 GAsyncResult *result,
8607 gboolean (* make_directory) (GFile *file,
8608 GCancellable *cancellable,
8610 void (* make_directory_async) (GFile *file,
8612 GCancellable *cancellable,
8613 GAsyncReadyCallback callback,
8614 gpointer user_data);
8615 gboolean (* make_directory_finish) (GFile *file,
8616 GAsyncResult *result,
8619 gboolean (* make_symbolic_link) (GFile *file,
8620 const char *symlink_value,
8621 GCancellable *cancellable,
8623 void (* _make_symbolic_link_async) (void);
8624 void (* _make_symbolic_link_finish) (void);
8626 gboolean (* copy) (GFile *source,
8628 GFileCopyFlags flags,
8629 GCancellable *cancellable,
8630 GFileProgressCallback progress_callback,
8631 gpointer progress_callback_data,
8633 void (* copy_async) (GFile *source,
8635 GFileCopyFlags flags,
8637 GCancellable *cancellable,
8638 GFileProgressCallback progress_callback,
8639 gpointer progress_callback_data,
8640 GAsyncReadyCallback callback,
8641 gpointer user_data);
8642 gboolean (* copy_finish) (GFile *file,
8646 gboolean (* move) (GFile *source,
8648 GFileCopyFlags flags,
8649 GCancellable *cancellable,
8650 GFileProgressCallback progress_callback,
8651 gpointer progress_callback_data,
8653 void (* _move_async) (void);
8654 void (* _move_finish) (void);
8656 void (* mount_mountable) (GFile *file,
8657 GMountMountFlags flags,
8658 GMountOperation *mount_operation,
8659 GCancellable *cancellable,
8660 GAsyncReadyCallback callback,
8661 gpointer user_data);
8662 GFile * (* mount_mountable_finish) (GFile *file,
8663 GAsyncResult *result,
8666 void (* unmount_mountable) (GFile *file,
8667 GMountUnmountFlags flags,
8668 GCancellable *cancellable,
8669 GAsyncReadyCallback callback,
8670 gpointer user_data);
8671 gboolean (* unmount_mountable_finish) (GFile *file,
8672 GAsyncResult *result,
8675 void (* eject_mountable) (GFile *file,
8676 GMountUnmountFlags flags,
8677 GCancellable *cancellable,
8678 GAsyncReadyCallback callback,
8679 gpointer user_data);
8680 gboolean (* eject_mountable_finish) (GFile *file,
8681 GAsyncResult *result,
8684 void (* mount_enclosing_volume) (GFile *location,
8685 GMountMountFlags flags,
8686 GMountOperation *mount_operation,
8687 GCancellable *cancellable,
8688 GAsyncReadyCallback callback,
8689 gpointer user_data);
8690 gboolean (* mount_enclosing_volume_finish) (GFile *location,
8691 GAsyncResult *result,
8694 GFileMonitor * (* monitor_dir) (GFile *file,
8695 GFileMonitorFlags flags,
8696 GCancellable *cancellable,
8698 GFileMonitor * (* monitor_file) (GFile *file,
8699 GFileMonitorFlags flags,
8700 GCancellable *cancellable,
8703 GFileIOStream * (* open_readwrite) (GFile *file,
8704 GCancellable *cancellable,
8706 void (* open_readwrite_async) (GFile *file,
8708 GCancellable *cancellable,
8709 GAsyncReadyCallback callback,
8710 gpointer user_data);
8711 GFileIOStream * (* open_readwrite_finish) (GFile *file,
8714 GFileIOStream * (* create_readwrite) (GFile *file,
8715 GFileCreateFlags flags,
8716 GCancellable *cancellable,
8718 void (* create_readwrite_async) (GFile *file,
8719 GFileCreateFlags flags,
8721 GCancellable *cancellable,
8722 GAsyncReadyCallback callback,
8723 gpointer user_data);
8724 GFileIOStream * (* create_readwrite_finish) (GFile *file,
8727 GFileIOStream * (* replace_readwrite) (GFile *file,
8729 gboolean make_backup,
8730 GFileCreateFlags flags,
8731 GCancellable *cancellable,
8733 void (* replace_readwrite_async) (GFile *file,
8735 gboolean make_backup,
8736 GFileCreateFlags flags,
8738 GCancellable *cancellable,
8739 GAsyncReadyCallback callback,
8740 gpointer user_data);
8741 GFileIOStream * (* replace_readwrite_finish) (GFile *file,
8745 void (* start_mountable) (GFile *file,
8746 GDriveStartFlags flags,
8747 GMountOperation *start_operation,
8748 GCancellable *cancellable,
8749 GAsyncReadyCallback callback,
8750 gpointer user_data);
8751 gboolean (* start_mountable_finish) (GFile *file,
8752 GAsyncResult *result,
8755 void (* stop_mountable) (GFile *file,
8756 GMountUnmountFlags flags,
8757 GMountOperation *mount_operation,
8758 GCancellable *cancellable,
8759 GAsyncReadyCallback callback,
8760 gpointer user_data);
8761 gboolean (* stop_mountable_finish) (GFile *file,
8762 GAsyncResult *result,
8765 gboolean supports_thread_contexts;
8767 void (* unmount_mountable_with_operation) (GFile *file,
8768 GMountUnmountFlags flags,
8769 GMountOperation *mount_operation,
8770 GCancellable *cancellable,
8771 GAsyncReadyCallback callback,
8772 gpointer user_data);
8773 gboolean (* unmount_mountable_with_operation_finish) (GFile *file,
8774 GAsyncResult *result,
8777 void (* eject_mountable_with_operation) (GFile *file,
8778 GMountUnmountFlags flags,
8779 GMountOperation *mount_operation,
8780 GCancellable *cancellable,
8781 GAsyncReadyCallback callback,
8782 gpointer user_data);
8783 gboolean (* eject_mountable_with_operation_finish) (GFile *file,
8784 GAsyncResult *result,
8787 void (* poll_mountable) (GFile *file,
8788 GCancellable *cancellable,
8789 GAsyncReadyCallback callback,
8790 gpointer user_data);
8791 gboolean (* poll_mountable_finish) (GFile *file,
8792 GAsyncResult *result,
8795 gboolean (* measure_disk_usage) (GFile *file,
8796 GFileMeasureFlags flags,
8797 GCancellable *cancellable,
8798 GFileMeasureProgressCallback progress_callback,
8799 gpointer progress_data,
8800 guint64 *disk_usage,
8804 void (* measure_disk_usage_async) (GFile *file,
8805 GFileMeasureFlags flags,
8807 GCancellable *cancellable,
8808 GFileMeasureProgressCallback progress_callback,
8809 gpointer progress_data,
8810 GAsyncReadyCallback callback,
8811 gpointer user_data);
8812 gboolean (* measure_disk_usage_finish) (GFile *file,
8813 GAsyncResult *result,
8814 guint64 *disk_usage,
8820 <p>An interface for writing VFS file handles.</p>
8821 <div class="refsect3">
8822 <a name="GFileIface.members"></a><h4>Members</h4>
8823 <div class="informaltable"><table class="informaltable" width="100%" border="0">
8825 <col width="300px" class="struct_members_name">
8826 <col class="struct_members_description">
8827 <col width="200px" class="struct_members_annotations">
8831 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.dup"></a>dup</code></em> ()</p></td>
8832 <td class="struct_member_description"><p>Duplicates a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p></td>
8833 <td class="struct_member_annotations"> </td>
8836 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.hash"></a>hash</code></em> ()</p></td>
8837 <td class="struct_member_description"><p>Creates a hash of a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p></td>
8838 <td class="struct_member_annotations"> </td>
8841 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.equal"></a>equal</code></em> ()</p></td>
8842 <td class="struct_member_description"><p>Checks equality of two given <a href="GFile.html#GFile-struct"><span class="type">GFiles</span></a>.</p></td>
8843 <td class="struct_member_annotations"> </td>
8846 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.is-native"></a>is_native</code></em> ()</p></td>
8847 <td class="struct_member_description"><p>Checks to see if a file is native to the system.</p></td>
8848 <td class="struct_member_annotations"> </td>
8851 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.has-uri-scheme"></a>has_uri_scheme</code></em> ()</p></td>
8852 <td class="struct_member_description"><p>Checks to see if a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> has a given URI scheme.</p></td>
8853 <td class="struct_member_annotations"> </td>
8856 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.get-uri-scheme"></a>get_uri_scheme</code></em> ()</p></td>
8857 <td class="struct_member_description"><p>Gets the URI scheme for a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p></td>
8858 <td class="struct_member_annotations"> </td>
8861 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.get-basename"></a>get_basename</code></em> ()</p></td>
8862 <td class="struct_member_description"><p>Gets the basename for a given <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p></td>
8863 <td class="struct_member_annotations"> </td>
8866 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.get-path"></a>get_path</code></em> ()</p></td>
8867 <td class="struct_member_description"><p>Gets the current path within a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p></td>
8868 <td class="struct_member_annotations"> </td>
8871 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.get-uri"></a>get_uri</code></em> ()</p></td>
8872 <td class="struct_member_description"><p>Gets a URI for the path within a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p></td>
8873 <td class="struct_member_annotations"> </td>
8876 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.get-parse-name"></a>get_parse_name</code></em> ()</p></td>
8877 <td class="struct_member_description"><p>Gets the parsed name for the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p></td>
8878 <td class="struct_member_annotations"> </td>
8881 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.get-parent"></a>get_parent</code></em> ()</p></td>
8882 <td class="struct_member_description"><p>Gets the parent directory for the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p></td>
8883 <td class="struct_member_annotations"> </td>
8886 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.prefix-matches"></a>prefix_matches</code></em> ()</p></td>
8887 <td class="struct_member_description"><p>Checks whether a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> contains a specified file.</p></td>
8888 <td class="struct_member_annotations"> </td>
8891 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.get-relative-path"></a>get_relative_path</code></em> ()</p></td>
8892 <td class="struct_member_description"><p>Gets the path for a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> relative to a given path.</p></td>
8893 <td class="struct_member_annotations"> </td>
8896 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.resolve-relative-path"></a>resolve_relative_path</code></em> ()</p></td>
8897 <td class="struct_member_description"><p>Resolves a relative path for a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> to an absolute path.</p></td>
8898 <td class="struct_member_annotations"> </td>
8901 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.get-child-for-display-name"></a>get_child_for_display_name</code></em> ()</p></td>
8902 <td class="struct_member_description"><p>Gets the child <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> for a given display name.</p></td>
8903 <td class="struct_member_annotations"> </td>
8906 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.enumerate-children"></a>enumerate_children</code></em> ()</p></td>
8907 <td class="struct_member_description"><p>Gets a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> with the children of a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p></td>
8908 <td class="struct_member_annotations"> </td>
8911 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.enumerate-children-async"></a>enumerate_children_async</code></em> ()</p></td>
8912 <td class="struct_member_description"><p>Asynchronously gets a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> with the children of a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p></td>
8913 <td class="struct_member_annotations"> </td>
8916 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.enumerate-children-finish"></a>enumerate_children_finish</code></em> ()</p></td>
8917 <td class="struct_member_description"><p>Finishes asynchronously enumerating the children.</p></td>
8918 <td class="struct_member_annotations"> </td>
8921 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.query-info"></a>query_info</code></em> ()</p></td>
8922 <td class="struct_member_description"><p>Gets the <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> for a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p></td>
8923 <td class="struct_member_annotations"> </td>
8926 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.query-info-async"></a>query_info_async</code></em> ()</p></td>
8927 <td class="struct_member_description"><p>Asynchronously gets the <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> for a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p></td>
8928 <td class="struct_member_annotations"> </td>
8931 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.query-info-finish"></a>query_info_finish</code></em> ()</p></td>
8932 <td class="struct_member_description"><p>Finishes an asynchronous query info operation.</p></td>
8933 <td class="struct_member_annotations"> </td>
8936 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.query-filesystem-info"></a>query_filesystem_info</code></em> ()</p></td>
8937 <td class="struct_member_description"><p>Gets a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> for the file system <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> is on.</p></td>
8938 <td class="struct_member_annotations"> </td>
8941 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.query-filesystem-info-async"></a>query_filesystem_info_async</code></em> ()</p></td>
8942 <td class="struct_member_description"><p>Asynchronously gets a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> for the file system <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> is on.</p></td>
8943 <td class="struct_member_annotations"> </td>
8946 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.query-filesystem-info-finish"></a>query_filesystem_info_finish</code></em> ()</p></td>
8947 <td class="struct_member_description"><p>Finishes asynchronously getting the file system info.</p></td>
8948 <td class="struct_member_annotations"> </td>
8951 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.find-enclosing-mount"></a>find_enclosing_mount</code></em> ()</p></td>
8952 <td class="struct_member_description"><p>Gets a <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> for the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p></td>
8953 <td class="struct_member_annotations"> </td>
8956 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.find-enclosing-mount-async"></a>find_enclosing_mount_async</code></em> ()</p></td>
8957 <td class="struct_member_description"><p>Asynchronously gets the <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> for a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p></td>
8958 <td class="struct_member_annotations"> </td>
8961 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.find-enclosing-mount-finish"></a>find_enclosing_mount_finish</code></em> ()</p></td>
8962 <td class="struct_member_description"><p>Finishes asynchronously getting the volume.</p></td>
8963 <td class="struct_member_annotations"> </td>
8966 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.set-display-name"></a>set_display_name</code></em> ()</p></td>
8967 <td class="struct_member_description"><p>Sets the display name for a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.</p></td>
8968 <td class="struct_member_annotations"> </td>
8971 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.set-display-name-async"></a>set_display_name_async</code></em> ()</p></td>
8972 <td class="struct_member_description"><p>Asynchronously sets a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>'s display name.</p></td>
8973 <td class="struct_member_annotations"> </td>
8976 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.set-display-name-finish"></a>set_display_name_finish</code></em> ()</p></td>
8977 <td class="struct_member_description"><p>Finishes asynchronously setting a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>'s display name.</p></td>
8978 <td class="struct_member_annotations"> </td>
8981 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.query-settable-attributes"></a>query_settable_attributes</code></em> ()</p></td>
8982 <td class="struct_member_description"><p>Returns a list of <span class="type">GFileAttributes</span> that can be set.</p></td>
8983 <td class="struct_member_annotations"> </td>
8986 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.-query-settable-attributes-async"></a>_query_settable_attributes_async</code></em> ()</p></td>
8987 <td class="struct_member_description"><p>Asynchronously gets a list of <span class="type">GFileAttributes</span> that can be set.</p></td>
8988 <td class="struct_member_annotations"> </td>
8991 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.-query-settable-attributes-finish"></a>_query_settable_attributes_finish</code></em> ()</p></td>
8992 <td class="struct_member_description"><p>Finishes asynchronously querying settable attributes.</p></td>
8993 <td class="struct_member_annotations"> </td>
8996 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.query-writable-namespaces"></a>query_writable_namespaces</code></em> ()</p></td>
8997 <td class="struct_member_description"><p>Returns a list of <span class="type">GFileAttribute</span> namespaces that are writable.</p></td>
8998 <td class="struct_member_annotations"> </td>
9001 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.-query-writable-namespaces-async"></a>_query_writable_namespaces_async</code></em> ()</p></td>
9002 <td class="struct_member_description"><p>Asynchronously gets a list of <span class="type">GFileAttribute</span> namespaces that are writable.</p></td>
9003 <td class="struct_member_annotations"> </td>
9006 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.-query-writable-namespaces-finish"></a>_query_writable_namespaces_finish</code></em> ()</p></td>
9007 <td class="struct_member_description"><p>Finishes asynchronously querying the writable namespaces.</p></td>
9008 <td class="struct_member_annotations"> </td>
9011 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.set-attribute"></a>set_attribute</code></em> ()</p></td>
9012 <td class="struct_member_description"><p>Sets a <span class="type">GFileAttribute</span>.</p></td>
9013 <td class="struct_member_annotations"> </td>
9016 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.set-attributes-from-info"></a>set_attributes_from_info</code></em> ()</p></td>
9017 <td class="struct_member_description"><p>Sets a <span class="type">GFileAttribute</span> with information from a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a>.</p></td>
9018 <td class="struct_member_annotations"> </td>
9021 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.set-attributes-async"></a>set_attributes_async</code></em> ()</p></td>
9022 <td class="struct_member_description"><p>Asynchronously sets a file's attributes.</p></td>
9023 <td class="struct_member_annotations"> </td>
9026 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.set-attributes-finish"></a>set_attributes_finish</code></em> ()</p></td>
9027 <td class="struct_member_description"><p>Finishes setting a file's attributes asynchronously.</p></td>
9028 <td class="struct_member_annotations"> </td>
9031 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.read-fn"></a>read_fn</code></em> ()</p></td>
9032 <td class="struct_member_description"><p>Reads a file asynchronously.</p></td>
9033 <td class="struct_member_annotations"> </td>
9036 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.read-async"></a>read_async</code></em> ()</p></td>
9037 <td class="struct_member_description"><p>Asynchronously reads a file.</p></td>
9038 <td class="struct_member_annotations"> </td>
9041 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.read-finish"></a>read_finish</code></em> ()</p></td>
9042 <td class="struct_member_description"><p>Finishes asynchronously reading a file.</p></td>
9043 <td class="struct_member_annotations"> </td>
9046 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.append-to"></a>append_to</code></em> ()</p></td>
9047 <td class="struct_member_description"><p>Writes to the end of a file.</p></td>
9048 <td class="struct_member_annotations"> </td>
9051 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.append-to-async"></a>append_to_async</code></em> ()</p></td>
9052 <td class="struct_member_description"><p>Asynchronously writes to the end of a file.</p></td>
9053 <td class="struct_member_annotations"> </td>
9056 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.append-to-finish"></a>append_to_finish</code></em> ()</p></td>
9057 <td class="struct_member_description"><p>Finishes an asynchronous file append operation.</p></td>
9058 <td class="struct_member_annotations"> </td>
9061 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.create"></a>create</code></em> ()</p></td>
9062 <td class="struct_member_description"><p>Creates a new file.</p></td>
9063 <td class="struct_member_annotations"> </td>
9066 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.create-async"></a>create_async</code></em> ()</p></td>
9067 <td class="struct_member_description"><p>Asynchronously creates a file.</p></td>
9068 <td class="struct_member_annotations"> </td>
9071 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.create-finish"></a>create_finish</code></em> ()</p></td>
9072 <td class="struct_member_description"><p>Finishes asynchronously creating a file.</p></td>
9073 <td class="struct_member_annotations"> </td>
9076 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.replace"></a>replace</code></em> ()</p></td>
9077 <td class="struct_member_description"><p>Replaces the contents of a file.</p></td>
9078 <td class="struct_member_annotations"> </td>
9081 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.replace-async"></a>replace_async</code></em> ()</p></td>
9082 <td class="struct_member_description"><p>Asynchronously replaces the contents of a file.</p></td>
9083 <td class="struct_member_annotations"> </td>
9086 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.replace-finish"></a>replace_finish</code></em> ()</p></td>
9087 <td class="struct_member_description"><p>Finishes asynchronously replacing a file.</p></td>
9088 <td class="struct_member_annotations"> </td>
9091 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.delete-file"></a>delete_file</code></em> ()</p></td>
9092 <td class="struct_member_description"><p>Deletes a file.</p></td>
9093 <td class="struct_member_annotations"> </td>
9096 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.delete-file-async"></a>delete_file_async</code></em> ()</p></td>
9097 <td class="struct_member_description"><p>Asynchronously deletes a file.</p></td>
9098 <td class="struct_member_annotations"> </td>
9101 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.delete-file-finish"></a>delete_file_finish</code></em> ()</p></td>
9102 <td class="struct_member_description"><p>Finishes an asynchronous delete.</p></td>
9103 <td class="struct_member_annotations"> </td>
9106 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.trash"></a>trash</code></em> ()</p></td>
9107 <td class="struct_member_description"><p>Sends a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> to the Trash location.</p></td>
9108 <td class="struct_member_annotations"> </td>
9111 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.trash-async"></a>trash_async</code></em> ()</p></td>
9112 <td class="struct_member_description"><p>Asynchronously sends a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> to the Trash location.</p></td>
9113 <td class="struct_member_annotations"> </td>
9116 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.trash-finish"></a>trash_finish</code></em> ()</p></td>
9117 <td class="struct_member_description"><p>Finishes an asynchronous file trashing operation.</p></td>
9118 <td class="struct_member_annotations"> </td>
9121 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.make-directory"></a>make_directory</code></em> ()</p></td>
9122 <td class="struct_member_description"><p>Makes a directory.</p></td>
9123 <td class="struct_member_annotations"> </td>
9126 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.make-directory-async"></a>make_directory_async</code></em> ()</p></td>
9127 <td class="struct_member_description"><p>Asynchronously makes a directory.</p></td>
9128 <td class="struct_member_annotations"> </td>
9131 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.make-directory-finish"></a>make_directory_finish</code></em> ()</p></td>
9132 <td class="struct_member_description"><p>Finishes making a directory asynchronously.</p></td>
9133 <td class="struct_member_annotations"> </td>
9136 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.make-symbolic-link"></a>make_symbolic_link</code></em> ()</p></td>
9137 <td class="struct_member_description"><p>Makes a symbolic link.</p></td>
9138 <td class="struct_member_annotations"> </td>
9141 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.-make-symbolic-link-async"></a>_make_symbolic_link_async</code></em> ()</p></td>
9142 <td class="struct_member_description"><p>Asynchronously makes a symbolic link</p></td>
9143 <td class="struct_member_annotations"> </td>
9146 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.-make-symbolic-link-finish"></a>_make_symbolic_link_finish</code></em> ()</p></td>
9147 <td class="struct_member_description"><p>Finishes making a symbolic link asynchronously.</p></td>
9148 <td class="struct_member_annotations"> </td>
9151 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.copy"></a>copy</code></em> ()</p></td>
9152 <td class="struct_member_description"><p>Copies a file.</p></td>
9153 <td class="struct_member_annotations"> </td>
9156 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.copy-async"></a>copy_async</code></em> ()</p></td>
9157 <td class="struct_member_description"><p>Asynchronously copies a file.</p></td>
9158 <td class="struct_member_annotations"> </td>
9161 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.copy-finish"></a>copy_finish</code></em> ()</p></td>
9162 <td class="struct_member_description"><p>Finishes an asynchronous copy operation.</p></td>
9163 <td class="struct_member_annotations"> </td>
9166 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.move"></a>move</code></em> ()</p></td>
9167 <td class="struct_member_description"><p>Moves a file.</p></td>
9168 <td class="struct_member_annotations"> </td>
9171 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.-move-async"></a>_move_async</code></em> ()</p></td>
9172 <td class="struct_member_description"><p>Asynchronously moves a file.</p></td>
9173 <td class="struct_member_annotations"> </td>
9176 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.-move-finish"></a>_move_finish</code></em> ()</p></td>
9177 <td class="struct_member_description"><p>Finishes an asynchronous move operation.</p></td>
9178 <td class="struct_member_annotations"> </td>
9181 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.mount-mountable"></a>mount_mountable</code></em> ()</p></td>
9182 <td class="struct_member_description"><p>Mounts a mountable object.</p></td>
9183 <td class="struct_member_annotations"> </td>
9186 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.mount-mountable-finish"></a>mount_mountable_finish</code></em> ()</p></td>
9187 <td class="struct_member_description"><p>Finishes a mounting operation.</p></td>
9188 <td class="struct_member_annotations"> </td>
9191 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.unmount-mountable"></a>unmount_mountable</code></em> ()</p></td>
9192 <td class="struct_member_description"><p>Unmounts a mountable object.</p></td>
9193 <td class="struct_member_annotations"> </td>
9196 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.unmount-mountable-finish"></a>unmount_mountable_finish</code></em> ()</p></td>
9197 <td class="struct_member_description"><p>Finishes an unmount operation.</p></td>
9198 <td class="struct_member_annotations"> </td>
9201 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.eject-mountable"></a>eject_mountable</code></em> ()</p></td>
9202 <td class="struct_member_description"><p>Ejects a mountable.</p></td>
9203 <td class="struct_member_annotations"> </td>
9206 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.eject-mountable-finish"></a>eject_mountable_finish</code></em> ()</p></td>
9207 <td class="struct_member_description"><p>Finishes an eject operation.</p></td>
9208 <td class="struct_member_annotations"> </td>
9211 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.mount-enclosing-volume"></a>mount_enclosing_volume</code></em> ()</p></td>
9212 <td class="struct_member_description"><p>Mounts a specified location.</p></td>
9213 <td class="struct_member_annotations"> </td>
9216 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.mount-enclosing-volume-finish"></a>mount_enclosing_volume_finish</code></em> ()</p></td>
9217 <td class="struct_member_description"><p>Finishes mounting a specified location.</p></td>
9218 <td class="struct_member_annotations"> </td>
9221 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.monitor-dir"></a>monitor_dir</code></em> ()</p></td>
9222 <td class="struct_member_description"><p>Creates a <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="type">GFileMonitor</span></a> for the location.</p></td>
9223 <td class="struct_member_annotations"> </td>
9226 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.monitor-file"></a>monitor_file</code></em> ()</p></td>
9227 <td class="struct_member_description"><p>Creates a <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="type">GFileMonitor</span></a> for the location.</p></td>
9228 <td class="struct_member_annotations"> </td>
9231 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.open-readwrite"></a>open_readwrite</code></em> ()</p></td>
9232 <td class="struct_member_description"><p>Open file read/write. Since 2.22.</p></td>
9233 <td class="struct_member_annotations"> </td>
9236 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.open-readwrite-async"></a>open_readwrite_async</code></em> ()</p></td>
9237 <td class="struct_member_description"><p>Asynchronously opens file read/write. Since 2.22.</p></td>
9238 <td class="struct_member_annotations"> </td>
9241 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.open-readwrite-finish"></a>open_readwrite_finish</code></em> ()</p></td>
9242 <td class="struct_member_description"><p>Finishes an asynchronous open read/write. Since 2.22.</p></td>
9243 <td class="struct_member_annotations"> </td>
9246 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.create-readwrite"></a>create_readwrite</code></em> ()</p></td>
9247 <td class="struct_member_description"><p>Creates file read/write. Since 2.22.</p></td>
9248 <td class="struct_member_annotations"> </td>
9251 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.create-readwrite-async"></a>create_readwrite_async</code></em> ()</p></td>
9252 <td class="struct_member_description"><p>Asynchronously creates file read/write. Since 2.22.</p></td>
9253 <td class="struct_member_annotations"> </td>
9256 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.create-readwrite-finish"></a>create_readwrite_finish</code></em> ()</p></td>
9257 <td class="struct_member_description"><p>Finishes an asynchronous creates read/write. Since 2.22.</p></td>
9258 <td class="struct_member_annotations"> </td>
9261 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.replace-readwrite"></a>replace_readwrite</code></em> ()</p></td>
9262 <td class="struct_member_description"><p>Replaces file read/write. Since 2.22.</p></td>
9263 <td class="struct_member_annotations"> </td>
9266 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.replace-readwrite-async"></a>replace_readwrite_async</code></em> ()</p></td>
9267 <td class="struct_member_description"><p>Asynchronously replaces file read/write. Since 2.22.</p></td>
9268 <td class="struct_member_annotations"> </td>
9271 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.replace-readwrite-finish"></a>replace_readwrite_finish</code></em> ()</p></td>
9272 <td class="struct_member_description"><p>Finishes an asynchronous replace read/write. Since 2.22.</p></td>
9273 <td class="struct_member_annotations"> </td>
9276 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.start-mountable"></a>start_mountable</code></em> ()</p></td>
9277 <td class="struct_member_description"><p>Starts a mountable object. Since 2.22.</p></td>
9278 <td class="struct_member_annotations"> </td>
9281 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.start-mountable-finish"></a>start_mountable_finish</code></em> ()</p></td>
9282 <td class="struct_member_description"><p>Finishes an start operation. Since 2.22.</p></td>
9283 <td class="struct_member_annotations"> </td>
9286 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.stop-mountable"></a>stop_mountable</code></em> ()</p></td>
9287 <td class="struct_member_description"><p>Stops a mountable. Since 2.22.</p></td>
9288 <td class="struct_member_annotations"> </td>
9291 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.stop-mountable-finish"></a>stop_mountable_finish</code></em> ()</p></td>
9292 <td class="struct_member_description"><p>Finishes an stop operation. Since 2.22.</p></td>
9293 <td class="struct_member_annotations"> </td>
9296 <td class="struct_member_name"><p><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> <em class="structfield"><code><a name="GFileIface.supports-thread-contexts"></a>supports_thread_contexts</code></em>;</p></td>
9297 <td class="struct_member_description"><p>a boolean that indicates whether the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> implementation supports thread-default contexts. Since 2.22.</p></td>
9298 <td class="struct_member_annotations"> </td>
9301 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.unmount-mountable-with-operation"></a>unmount_mountable_with_operation</code></em> ()</p></td>
9302 <td class="struct_member_description"><p>Unmounts a mountable object using a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>. Since 2.22.</p></td>
9303 <td class="struct_member_annotations"> </td>
9306 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.unmount-mountable-with-operation-finish"></a>unmount_mountable_with_operation_finish</code></em> ()</p></td>
9307 <td class="struct_member_description"><p>Finishes an unmount operation using a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>. Since 2.22.</p></td>
9308 <td class="struct_member_annotations"> </td>
9311 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.eject-mountable-with-operation"></a>eject_mountable_with_operation</code></em> ()</p></td>
9312 <td class="struct_member_description"><p>Ejects a mountable object using a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>. Since 2.22.</p></td>
9313 <td class="struct_member_annotations"> </td>
9316 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.eject-mountable-with-operation-finish"></a>eject_mountable_with_operation_finish</code></em> ()</p></td>
9317 <td class="struct_member_description"><p>Finishes an eject operation using a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>. Since 2.22.</p></td>
9318 <td class="struct_member_annotations"> </td>
9321 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.poll-mountable"></a>poll_mountable</code></em> ()</p></td>
9322 <td class="struct_member_description"><p>Polls a mountable object for media changes. Since 2.22.</p></td>
9323 <td class="struct_member_annotations"> </td>
9326 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.poll-mountable-finish"></a>poll_mountable_finish</code></em> ()</p></td>
9327 <td class="struct_member_description"><p>Finishes an poll operation for media changes. Since 2.22.</p></td>
9328 <td class="struct_member_annotations"> </td>
9331 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.measure-disk-usage"></a>measure_disk_usage</code></em> ()</p></td>
9332 <td class="struct_member_description"><p>Recursively measures the disk usage of <em class="parameter"><code>file</code></em>
9333 . Since 2.38</p></td>
9334 <td class="struct_member_annotations"> </td>
9337 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.measure-disk-usage-async"></a>measure_disk_usage_async</code></em> ()</p></td>
9338 <td class="struct_member_description"><p>Asynchronously recursively measures the disk usage of <em class="parameter"><code>file</code></em>
9339 . Since 2.38</p></td>
9340 <td class="struct_member_annotations"> </td>
9343 <td class="struct_member_name"><p><em class="structfield"><code><a name="GFileIface.measure-disk-usage-finish"></a>measure_disk_usage_finish</code></em> ()</p></td>
9344 <td class="struct_member_description"><p>Finishes an asynchronous recursive measurement of the disk usage of <em class="parameter"><code>file</code></em>
9345 . Since 2.38</p></td>
9346 <td class="struct_member_annotations"> </td>
9353 <div class="refsect2">
9354 <a name="GFileQueryInfoFlags"></a><h3>enum GFileQueryInfoFlags</h3>
9355 <p>Flags used when querying a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a>.</p>
9356 <div class="refsect3">
9357 <a name="GFileQueryInfoFlags.members"></a><h4>Members</h4>
9358 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9360 <col width="300px" class="enum_members_name">
9361 <col class="enum_members_description">
9362 <col width="200px" class="enum_members_annotations">
9366 <td class="enum_member_name"><p><a name="G-FILE-QUERY-INFO-NONE:CAPS"></a>G_FILE_QUERY_INFO_NONE</p></td>
9367 <td class="enum_member_description">
9368 <p>No flags set.</p>
9370 <td class="enum_member_annotations"> </td>
9373 <td class="enum_member_name"><p><a name="G-FILE-QUERY-INFO-NOFOLLOW-SYMLINKS:CAPS"></a>G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS</p></td>
9374 <td class="enum_member_description">
9375 <p>Don't follow symlinks.</p>
9377 <td class="enum_member_annotations"> </td>
9384 <div class="refsect2">
9385 <a name="GFileCreateFlags"></a><h3>enum GFileCreateFlags</h3>
9386 <p>Flags used when an operation may create a file.</p>
9387 <div class="refsect3">
9388 <a name="GFileCreateFlags.members"></a><h4>Members</h4>
9389 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9391 <col width="300px" class="enum_members_name">
9392 <col class="enum_members_description">
9393 <col width="200px" class="enum_members_annotations">
9397 <td class="enum_member_name"><p><a name="G-FILE-CREATE-NONE:CAPS"></a>G_FILE_CREATE_NONE</p></td>
9398 <td class="enum_member_description">
9399 <p>No flags set.</p>
9401 <td class="enum_member_annotations"> </td>
9404 <td class="enum_member_name"><p><a name="G-FILE-CREATE-PRIVATE:CAPS"></a>G_FILE_CREATE_PRIVATE</p></td>
9405 <td class="enum_member_description">
9406 <p>Create a file that can only be
9407 accessed by the current user.</p>
9409 <td class="enum_member_annotations"> </td>
9412 <td class="enum_member_name"><p><a name="G-FILE-CREATE-REPLACE-DESTINATION:CAPS"></a>G_FILE_CREATE_REPLACE_DESTINATION</p></td>
9413 <td class="enum_member_description">
9414 <p>Replace the destination
9415 as if it didn't exist before. Don't try to keep any old
9416 permissions, replace instead of following links. This
9417 is generally useful if you're doing a "copy over"
9418 rather than a "save new version of" replace operation.
9419 You can think of it as "unlink destination" before
9420 writing to it, although the implementation may not
9421 be exactly like that. Since 2.20</p>
9423 <td class="enum_member_annotations"> </td>
9430 <div class="refsect2">
9431 <a name="GFileCopyFlags"></a><h3>enum GFileCopyFlags</h3>
9432 <p>Flags used when copying or moving files.</p>
9433 <div class="refsect3">
9434 <a name="GFileCopyFlags.members"></a><h4>Members</h4>
9435 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9437 <col width="300px" class="enum_members_name">
9438 <col class="enum_members_description">
9439 <col width="200px" class="enum_members_annotations">
9443 <td class="enum_member_name"><p><a name="G-FILE-COPY-NONE:CAPS"></a>G_FILE_COPY_NONE</p></td>
9444 <td class="enum_member_description">
9445 <p>No flags set.</p>
9447 <td class="enum_member_annotations"> </td>
9450 <td class="enum_member_name"><p><a name="G-FILE-COPY-OVERWRITE:CAPS"></a>G_FILE_COPY_OVERWRITE</p></td>
9451 <td class="enum_member_description">
9452 <p>Overwrite any existing files</p>
9454 <td class="enum_member_annotations"> </td>
9457 <td class="enum_member_name"><p><a name="G-FILE-COPY-BACKUP:CAPS"></a>G_FILE_COPY_BACKUP</p></td>
9458 <td class="enum_member_description">
9459 <p>Make a backup of any existing files.</p>
9461 <td class="enum_member_annotations"> </td>
9464 <td class="enum_member_name"><p><a name="G-FILE-COPY-NOFOLLOW-SYMLINKS:CAPS"></a>G_FILE_COPY_NOFOLLOW_SYMLINKS</p></td>
9465 <td class="enum_member_description">
9466 <p>Don't follow symlinks.</p>
9468 <td class="enum_member_annotations"> </td>
9471 <td class="enum_member_name"><p><a name="G-FILE-COPY-ALL-METADATA:CAPS"></a>G_FILE_COPY_ALL_METADATA</p></td>
9472 <td class="enum_member_description">
9473 <p>Copy all file metadata instead of just default set used for copy (see <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a>).</p>
9475 <td class="enum_member_annotations"> </td>
9478 <td class="enum_member_name"><p><a name="G-FILE-COPY-NO-FALLBACK-FOR-MOVE:CAPS"></a>G_FILE_COPY_NO_FALLBACK_FOR_MOVE</p></td>
9479 <td class="enum_member_description">
9480 <p>Don't use copy and delete fallback if native move not supported.</p>
9482 <td class="enum_member_annotations"> </td>
9485 <td class="enum_member_name"><p><a name="G-FILE-COPY-TARGET-DEFAULT-PERMS:CAPS"></a>G_FILE_COPY_TARGET_DEFAULT_PERMS</p></td>
9486 <td class="enum_member_description">
9487 <p>Leaves target file with default perms, instead of setting the source file perms.</p>
9489 <td class="enum_member_annotations"> </td>
9496 <div class="refsect2">
9497 <a name="GFileMonitorFlags"></a><h3>enum GFileMonitorFlags</h3>
9498 <p>Flags used to set what a <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="type">GFileMonitor</span></a> will watch for.</p>
9499 <div class="refsect3">
9500 <a name="GFileMonitorFlags.members"></a><h4>Members</h4>
9501 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9503 <col width="300px" class="enum_members_name">
9504 <col class="enum_members_description">
9505 <col width="200px" class="enum_members_annotations">
9509 <td class="enum_member_name"><p><a name="G-FILE-MONITOR-NONE:CAPS"></a>G_FILE_MONITOR_NONE</p></td>
9510 <td class="enum_member_description">
9511 <p>No flags set.</p>
9513 <td class="enum_member_annotations"> </td>
9516 <td class="enum_member_name"><p><a name="G-FILE-MONITOR-WATCH-MOUNTS:CAPS"></a>G_FILE_MONITOR_WATCH_MOUNTS</p></td>
9517 <td class="enum_member_description">
9518 <p>Watch for mount events.</p>
9520 <td class="enum_member_annotations"> </td>
9523 <td class="enum_member_name"><p><a name="G-FILE-MONITOR-SEND-MOVED:CAPS"></a>G_FILE_MONITOR_SEND_MOVED</p></td>
9524 <td class="enum_member_description">
9525 <p>Pair DELETED and CREATED events caused
9526 by file renames (moves) and send a single G_FILE_MONITOR_EVENT_MOVED
9527 event instead (NB: not supported on all backends; the default
9528 behaviour -without specifying this flag- is to send single DELETED
9529 and CREATED events). Deprecated since 2.46: use
9530 <a class="link" href="GFile.html#G-FILE-MONITOR-WATCH-MOVES:CAPS"><code class="literal">G_FILE_MONITOR_WATCH_MOVES</code></a> instead.</p>
9532 <td class="enum_member_annotations"> </td>
9535 <td class="enum_member_name"><p><a name="G-FILE-MONITOR-WATCH-HARD-LINKS:CAPS"></a>G_FILE_MONITOR_WATCH_HARD_LINKS</p></td>
9536 <td class="enum_member_description">
9537 <p>Watch for changes to the file made
9538 via another hard link. Since 2.36.</p>
9540 <td class="enum_member_annotations"> </td>
9543 <td class="enum_member_name"><p><a name="G-FILE-MONITOR-WATCH-MOVES:CAPS"></a>G_FILE_MONITOR_WATCH_MOVES</p></td>
9544 <td class="enum_member_description">
9545 <p>Watch for rename operations on a
9546 monitored directory. This causes <a class="link" href="GFileMonitor.html#G-FILE-MONITOR-EVENT-RENAMED:CAPS"><code class="literal">G_FILE_MONITOR_EVENT_RENAMED</code></a>,
9547 <a class="link" href="GFileMonitor.html#G-FILE-MONITOR-EVENT-MOVED-IN:CAPS"><code class="literal">G_FILE_MONITOR_EVENT_MOVED_IN</code></a> and <a class="link" href="GFileMonitor.html#G-FILE-MONITOR-EVENT-MOVED-OUT:CAPS"><code class="literal">G_FILE_MONITOR_EVENT_MOVED_OUT</code></a>
9548 events to be emitted when possible. Since: 2.46.</p>
9550 <td class="enum_member_annotations"> </td>
9557 <div class="refsect2">
9558 <a name="GFileMeasureFlags"></a><h3>enum GFileMeasureFlags</h3>
9559 <p>Flags that can be used with <a class="link" href="GFile.html#g-file-measure-disk-usage" title="g_file_measure_disk_usage ()"><code class="function">g_file_measure_disk_usage()</code></a>.</p>
9560 <div class="refsect3">
9561 <a name="GFileMeasureFlags.members"></a><h4>Members</h4>
9562 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9564 <col width="300px" class="enum_members_name">
9565 <col class="enum_members_description">
9566 <col width="200px" class="enum_members_annotations">
9570 <td class="enum_member_name"><p><a name="G-FILE-MEASURE-NONE:CAPS"></a>G_FILE_MEASURE_NONE</p></td>
9571 <td class="enum_member_description">
9572 <p>No flags set.</p>
9574 <td class="enum_member_annotations"> </td>
9577 <td class="enum_member_name"><p><a name="G-FILE-MEASURE-REPORT-ANY-ERROR:CAPS"></a>G_FILE_MEASURE_REPORT_ANY_ERROR</p></td>
9578 <td class="enum_member_description">
9579 <p>Report any error encountered
9580 while traversing the directory tree. Normally errors are only
9581 reported for the toplevel file.</p>
9583 <td class="enum_member_annotations"> </td>
9586 <td class="enum_member_name"><p><a name="G-FILE-MEASURE-APPARENT-SIZE:CAPS"></a>G_FILE_MEASURE_APPARENT_SIZE</p></td>
9587 <td class="enum_member_description">
9588 <p>Tally usage based on apparent file
9589 sizes. Normally, the block-size is used, if available, as this is a
9590 more accurate representation of disk space used.
9591 Compare with <code class="literal">du --apparent-size</code>.</p>
9593 <td class="enum_member_annotations"> </td>
9596 <td class="enum_member_name"><p><a name="G-FILE-MEASURE-NO-XDEV:CAPS"></a>G_FILE_MEASURE_NO_XDEV</p></td>
9597 <td class="enum_member_description">
9598 <p>Do not cross mount point boundaries.
9599 Compare with <code class="literal">du -x</code>.</p>
9601 <td class="enum_member_annotations"> </td>
9606 <p class="since">Since: <a class="link" href="api-index-2-38.html#api-index-2.38">2.38</a></p>
9609 <div class="refsect2">
9610 <a name="GFilesystemPreviewType"></a><h3>enum GFilesystemPreviewType</h3>
9611 <p>Indicates a hint from the file system whether files should be
9612 previewed in a file manager. Returned as the value of the key
9613 <a class="link" href="GFileInfo.html#G-FILE-ATTRIBUTE-FILESYSTEM-USE-PREVIEW:CAPS" title="G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW"><span class="type">G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW</span></a>.</p>
9614 <div class="refsect3">
9615 <a name="GFilesystemPreviewType.members"></a><h4>Members</h4>
9616 <div class="informaltable"><table class="informaltable" width="100%" border="0">
9618 <col width="300px" class="enum_members_name">
9619 <col class="enum_members_description">
9620 <col width="200px" class="enum_members_annotations">
9624 <td class="enum_member_name"><p><a name="G-FILESYSTEM-PREVIEW-TYPE-IF-ALWAYS:CAPS"></a>G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS</p></td>
9625 <td class="enum_member_description">
9626 <p>Only preview files if user has explicitly requested it.</p>
9628 <td class="enum_member_annotations"> </td>
9631 <td class="enum_member_name"><p><a name="G-FILESYSTEM-PREVIEW-TYPE-IF-LOCAL:CAPS"></a>G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL</p></td>
9632 <td class="enum_member_description">
9633 <p>Preview files if user has requested preview of "local" files.</p>
9635 <td class="enum_member_annotations"> </td>
9638 <td class="enum_member_name"><p><a name="G-FILESYSTEM-PREVIEW-TYPE-NEVER:CAPS"></a>G_FILESYSTEM_PREVIEW_TYPE_NEVER</p></td>
9639 <td class="enum_member_description">
9640 <p>Never preview files.</p>
9642 <td class="enum_member_annotations"> </td>
9649 <div class="refsect1">
9650 <a name="GFile.see-also"></a><h2>See Also</h2>
9651 <p><a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a>, <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a></p>
9654 <div class="footer">
9655 <hr>Generated by GTK-Doc V1.25.1</div>