<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="GFile">
<refmeta>
<refentrytitle role="top_of_page" id="GFile.top_of_page">GFile</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GIO Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GFile</refname>
<refpurpose>File and Directory Handling</refpurpose>
</refnamediv>

<refsynopsisdiv id="GFile.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>

#include &lt;gio/gio.h&gt;

                    <link linkend="GFile-struct">GFile</link>;
                    <link linkend="GFileIface">GFileIface</link>;
enum                <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link>;
enum                <link linkend="GFileCreateFlags">GFileCreateFlags</link>;
enum                <link linkend="GFileCopyFlags">GFileCopyFlags</link>;
enum                <link linkend="GFileMonitorFlags">GFileMonitorFlags</link>;
enum                <link linkend="GFilesystemPreviewType">GFilesystemPreviewType</link>;
<link linkend="void">void</link>                (<link linkend="GFileProgressCallback">*GFileProgressCallback</link>)            (<link linkend="goffset">goffset</link> current_num_bytes,
                                                         <link linkend="goffset">goffset</link> total_num_bytes,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            (<link linkend="GFileReadMoreCallback">*GFileReadMoreCallback</link>)            (const <link linkend="char">char</link> *file_contents,
                                                         <link linkend="goffset">goffset</link> file_size,
                                                         <link linkend="gpointer">gpointer</link> callback_data);
<link linkend="GFile">GFile</link> *             <link linkend="g-file-new-for-path">g_file_new_for_path</link>                 (const <link linkend="char">char</link> *path);
<link linkend="GFile">GFile</link> *             <link linkend="g-file-new-for-uri">g_file_new_for_uri</link>                  (const <link linkend="char">char</link> *uri);
<link linkend="GFile">GFile</link> *             <link linkend="g-file-new-for-commandline-arg">g_file_new_for_commandline_arg</link>      (const <link linkend="char">char</link> *arg);
<link linkend="GFile">GFile</link> *             <link linkend="g-file-parse-name">g_file_parse_name</link>                   (const <link linkend="char">char</link> *parse_name);
<link linkend="GFile">GFile</link> *             <link linkend="g-file-dup">g_file_dup</link>                          (<link linkend="GFile">GFile</link> *file);
<link linkend="guint">guint</link>               <link linkend="g-file-hash">g_file_hash</link>                         (<link linkend="gconstpointer">gconstpointer</link> file);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-equal">g_file_equal</link>                        (<link linkend="GFile">GFile</link> *file1,
                                                         <link linkend="GFile">GFile</link> *file2);
<link linkend="char">char</link> *              <link linkend="g-file-get-basename">g_file_get_basename</link>                 (<link linkend="GFile">GFile</link> *file);
<link linkend="char">char</link> *              <link linkend="g-file-get-path">g_file_get_path</link>                     (<link linkend="GFile">GFile</link> *file);
<link linkend="char">char</link> *              <link linkend="g-file-get-uri">g_file_get_uri</link>                      (<link linkend="GFile">GFile</link> *file);
<link linkend="char">char</link> *              <link linkend="g-file-get-parse-name">g_file_get_parse_name</link>               (<link linkend="GFile">GFile</link> *file);
<link linkend="GFile">GFile</link> *             <link linkend="g-file-get-parent">g_file_get_parent</link>                   (<link linkend="GFile">GFile</link> *file);
<link linkend="GFile">GFile</link> *             <link linkend="g-file-get-child">g_file_get_child</link>                    (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *name);
<link linkend="GFile">GFile</link> *             <link linkend="g-file-get-child-for-display-name">g_file_get_child_for_display_name</link>   (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *display_name,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-has-prefix">g_file_has_prefix</link>                   (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFile">GFile</link> *prefix);
<link linkend="char">char</link> *              <link linkend="g-file-get-relative-path">g_file_get_relative_path</link>            (<link linkend="GFile">GFile</link> *parent,
                                                         <link linkend="GFile">GFile</link> *descendant);
<link linkend="GFile">GFile</link> *             <link linkend="g-file-resolve-relative-path">g_file_resolve_relative_path</link>        (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *relative_path);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-is-native">g_file_is_native</link>                    (<link linkend="GFile">GFile</link> *file);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-has-uri-scheme">g_file_has_uri_scheme</link>               (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *uri_scheme);
<link linkend="char">char</link> *              <link linkend="g-file-get-uri-scheme">g_file_get_uri_scheme</link>               (<link linkend="GFile">GFile</link> *file);
<link linkend="GFileInputStream">GFileInputStream</link> *  <link linkend="g-file-read">g_file_read</link>                         (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-read-async">g_file_read_async</link>                   (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="GFileInputStream">GFileInputStream</link> *  <link linkend="g-file-read-finish">g_file_read_finish</link>                  (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GFileOutputStream">GFileOutputStream</link> * <link linkend="g-file-append-to">g_file_append_to</link>                    (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GFileOutputStream">GFileOutputStream</link> * <link linkend="g-file-create">g_file_create</link>                       (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GFileOutputStream">GFileOutputStream</link> * <link linkend="g-file-replace">g_file_replace</link>                      (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *etag,
                                                         <link linkend="gboolean">gboolean</link> make_backup,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-append-to-async">g_file_append_to_async</link>              (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="GFileOutputStream">GFileOutputStream</link> * <link linkend="g-file-append-to-finish">g_file_append_to_finish</link>             (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-create-async">g_file_create_async</link>                 (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="GFileOutputStream">GFileOutputStream</link> * <link linkend="g-file-create-finish">g_file_create_finish</link>                (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-replace-async">g_file_replace_async</link>                (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *etag,
                                                         <link linkend="gboolean">gboolean</link> make_backup,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="GFileOutputStream">GFileOutputStream</link> * <link linkend="g-file-replace-finish">g_file_replace_finish</link>               (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GFileInfo">GFileInfo</link> *         <link linkend="g-file-query-info">g_file_query_info</link>                   (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attributes,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-query-info-async">g_file_query_info_async</link>             (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attributes,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="GFileInfo">GFileInfo</link> *         <link linkend="g-file-query-info-finish">g_file_query_info_finish</link>            (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-query-exists">g_file_query_exists</link>                 (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable);
<link linkend="GFileType">GFileType</link>           <link linkend="g-file-query-file-type">g_file_query_file_type</link>              (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable);
<link linkend="GFileInfo">GFileInfo</link> *         <link linkend="g-file-query-filesystem-info">g_file_query_filesystem_info</link>        (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attributes,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-query-filesystem-info-async">g_file_query_filesystem_info_async</link>  (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attributes,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="GFileInfo">GFileInfo</link> *         <link linkend="g-file-query-filesystem-info-finish">g_file_query_filesystem_info_finish</link> (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GAppInfo">GAppInfo</link> *          <link linkend="g-file-query-default-handler">g_file_query_default_handler</link>        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GMount">GMount</link> *            <link linkend="g-file-find-enclosing-mount">g_file_find_enclosing_mount</link>         (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-find-enclosing-mount-async">g_file_find_enclosing_mount_async</link>   (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="GMount">GMount</link> *            <link linkend="g-file-find-enclosing-mount-finish">g_file_find_enclosing_mount_finish</link>  (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GFileEnumerator">GFileEnumerator</link> *   <link linkend="g-file-enumerate-children">g_file_enumerate_children</link>           (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attributes,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-enumerate-children-async">g_file_enumerate_children_async</link>     (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attributes,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="GFileEnumerator">GFileEnumerator</link> *   <link linkend="g-file-enumerate-children-finish">g_file_enumerate_children_finish</link>    (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GFile">GFile</link> *             <link linkend="g-file-set-display-name">g_file_set_display_name</link>             (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *display_name,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-set-display-name-async">g_file_set_display_name_async</link>       (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *display_name,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="GFile">GFile</link> *             <link linkend="g-file-set-display-name-finish">g_file_set_display_name_finish</link>      (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-delete">g_file_delete</link>                       (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-trash">g_file_trash</link>                        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-copy">g_file_copy</link>                         (<link linkend="GFile">GFile</link> *source,
                                                         <link linkend="GFile">GFile</link> *destination,
                                                         <link linkend="GFileCopyFlags">GFileCopyFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GFileProgressCallback">GFileProgressCallback</link> progress_callback,
                                                         <link linkend="gpointer">gpointer</link> progress_callback_data,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-copy-async">g_file_copy_async</link>                   (<link linkend="GFile">GFile</link> *source,
                                                         <link linkend="GFile">GFile</link> *destination,
                                                         <link linkend="GFileCopyFlags">GFileCopyFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GFileProgressCallback">GFileProgressCallback</link> progress_callback,
                                                         <link linkend="gpointer">gpointer</link> progress_callback_data,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-copy-finish">g_file_copy_finish</link>                  (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-move">g_file_move</link>                         (<link linkend="GFile">GFile</link> *source,
                                                         <link linkend="GFile">GFile</link> *destination,
                                                         <link linkend="GFileCopyFlags">GFileCopyFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GFileProgressCallback">GFileProgressCallback</link> progress_callback,
                                                         <link linkend="gpointer">gpointer</link> progress_callback_data,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-make-directory">g_file_make_directory</link>               (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-make-directory-with-parents">g_file_make_directory_with_parents</link>  (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-make-symbolic-link">g_file_make_symbolic_link</link>           (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *symlink_value,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GFileAttributeInfoList">GFileAttributeInfoList</link> * <link linkend="g-file-query-settable-attributes">g_file_query_settable_attributes</link>
                                                        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GFileAttributeInfoList">GFileAttributeInfoList</link> * <link linkend="g-file-query-writable-namespaces">g_file_query_writable_namespaces</link>
                                                        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-set-attribute">g_file_set_attribute</link>                (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attribute,
                                                         <link linkend="GFileAttributeType">GFileAttributeType</link> type,
                                                         <link linkend="gpointer">gpointer</link> value_p,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-set-attributes-from-info">g_file_set_attributes_from_info</link>     (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileInfo">GFileInfo</link> *info,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-set-attributes-async">g_file_set_attributes_async</link>         (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileInfo">GFileInfo</link> *info,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-set-attributes-finish">g_file_set_attributes_finish</link>        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GFileInfo">GFileInfo</link> **info,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-set-attribute-string">g_file_set_attribute_string</link>         (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attribute,
                                                         const <link linkend="char">char</link> *value,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-set-attribute-byte-string">g_file_set_attribute_byte_string</link>    (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attribute,
                                                         const <link linkend="char">char</link> *value,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-set-attribute-uint32">g_file_set_attribute_uint32</link>         (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attribute,
                                                         <link linkend="guint32">guint32</link> value,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-set-attribute-int32">g_file_set_attribute_int32</link>          (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attribute,
                                                         <link linkend="gint32">gint32</link> value,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-set-attribute-uint64">g_file_set_attribute_uint64</link>         (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attribute,
                                                         <link linkend="guint64">guint64</link> value,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-set-attribute-int64">g_file_set_attribute_int64</link>          (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attribute,
                                                         <link linkend="gint64">gint64</link> value,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-mount-mountable">g_file_mount_mountable</link>              (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GMountMountFlags">GMountMountFlags</link> flags,
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="GFile">GFile</link> *             <link linkend="g-file-mount-mountable-finish">g_file_mount_mountable_finish</link>       (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-unmount-mountable">g_file_unmount_mountable</link>            (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-unmount-mountable-finish">g_file_unmount_mountable_finish</link>     (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-unmount-mountable-with-operation">g_file_unmount_mountable_with_operation</link>
                                                        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-unmount-mountable-with-operation-finish">g_file_unmount_mountable_with_operation_finish</link>
                                                        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-eject-mountable">g_file_eject_mountable</link>              (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-eject-mountable-finish">g_file_eject_mountable_finish</link>       (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-eject-mountable-with-operation">g_file_eject_mountable_with_operation</link>
                                                        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-eject-mountable-with-operation-finish">g_file_eject_mountable_with_operation_finish</link>
                                                        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-start-mountable">g_file_start_mountable</link>              (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GDriveStartFlags">GDriveStartFlags</link> flags,
                                                         <link linkend="GMountOperation">GMountOperation</link> *start_operation,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-start-mountable-finish">g_file_start_mountable_finish</link>       (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-stop-mountable">g_file_stop_mountable</link>               (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-stop-mountable-finish">g_file_stop_mountable_finish</link>        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-poll-mountable">g_file_poll_mountable</link>               (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-poll-mountable-finish">g_file_poll_mountable_finish</link>        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-mount-enclosing-volume">g_file_mount_enclosing_volume</link>       (<link linkend="GFile">GFile</link> *location,
                                                         <link linkend="GMountMountFlags">GMountMountFlags</link> flags,
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-mount-enclosing-volume-finish">g_file_mount_enclosing_volume_finish</link>
                                                        (<link linkend="GFile">GFile</link> *location,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GFileMonitor">GFileMonitor</link>*       <link linkend="g-file-monitor-directory">g_file_monitor_directory</link>            (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileMonitorFlags">GFileMonitorFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GFileMonitor">GFileMonitor</link>*       <link linkend="g-file-monitor-file">g_file_monitor_file</link>                 (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileMonitorFlags">GFileMonitorFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GFileMonitor">GFileMonitor</link>*       <link linkend="g-file-monitor">g_file_monitor</link>                      (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileMonitorFlags">GFileMonitorFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-load-contents">g_file_load_contents</link>                (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="char">char</link> **contents,
                                                         <link linkend="gsize">gsize</link> *length,
                                                         <link linkend="char">char</link> **etag_out,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-load-contents-async">g_file_load_contents_async</link>          (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-load-contents-finish">g_file_load_contents_finish</link>         (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="char">char</link> **contents,
                                                         <link linkend="gsize">gsize</link> *length,
                                                         <link linkend="char">char</link> **etag_out,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-load-partial-contents-async">g_file_load_partial_contents_async</link>  (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GFileReadMoreCallback">GFileReadMoreCallback</link> read_more_callback,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-load-partial-contents-finish">g_file_load_partial_contents_finish</link> (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="char">char</link> **contents,
                                                         <link linkend="gsize">gsize</link> *length,
                                                         <link linkend="char">char</link> **etag_out,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-replace-contents">g_file_replace_contents</link>             (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *contents,
                                                         <link linkend="gsize">gsize</link> length,
                                                         const <link linkend="char">char</link> *etag,
                                                         <link linkend="gboolean">gboolean</link> make_backup,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="char">char</link> **new_etag,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-replace-contents-async">g_file_replace_contents_async</link>       (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *contents,
                                                         <link linkend="gsize">gsize</link> length,
                                                         const <link linkend="char">char</link> *etag,
                                                         <link linkend="gboolean">gboolean</link> make_backup,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-replace-contents-finish">g_file_replace_contents_finish</link>      (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="char">char</link> **new_etag,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-file-copy-attributes">g_file_copy_attributes</link>              (<link linkend="GFile">GFile</link> *source,
                                                         <link linkend="GFile">GFile</link> *destination,
                                                         <link linkend="GFileCopyFlags">GFileCopyFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GFileIOStream">GFileIOStream</link> *     <link linkend="g-file-create-readwrite">g_file_create_readwrite</link>             (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-create-readwrite-async">g_file_create_readwrite_async</link>       (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="GFileIOStream">GFileIOStream</link> *     <link linkend="g-file-create-readwrite-finish">g_file_create_readwrite_finish</link>      (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GFileIOStream">GFileIOStream</link> *     <link linkend="g-file-open-readwrite">g_file_open_readwrite</link>               (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-open-readwrite-async">g_file_open_readwrite_async</link>         (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="GFileIOStream">GFileIOStream</link> *     <link linkend="g-file-open-readwrite-finish">g_file_open_readwrite_finish</link>        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="GFileIOStream">GFileIOStream</link> *     <link linkend="g-file-replace-readwrite">g_file_replace_readwrite</link>            (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *etag,
                                                         <link linkend="gboolean">gboolean</link> make_backup,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-file-replace-readwrite-async">g_file_replace_readwrite_async</link>      (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *etag,
                                                         <link linkend="gboolean">gboolean</link> make_backup,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="GFileIOStream">GFileIOStream</link> *     <link linkend="g-file-replace-readwrite-finish">g_file_replace_readwrite_finish</link>     (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);
</synopsis>
</refsynopsisdiv>

<refsect1 id="GFile.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GInterface">GInterface</link>
   +----GFile
</synopsis>
</refsect1>

<refsect1 id="GFile.prerequisites" role="prerequisites">
<title role="prerequisites.title">Prerequisites</title>
<para>
GFile requires
 <link linkend="GObject">GObject</link>.</para>
</refsect1>







<refsect1 id="GFile.description" role="desc">
<title role="desc.title">Description</title>
<para>
<link linkend="GFile"><type>GFile</type></link> is a high level abstraction for manipulating files on a 
virtual file system. <link linkend="GFile"><type>GFile</type></link><!-- -->s are lightweight, immutable 
objects that do no I/O upon creation. It is necessary to understand that
<link linkend="GFile"><type>GFile</type></link> objects do not represent files, merely an identifier for a file. All
file content I/O is implemented as streaming operations (see <link linkend="GInputStream"><type>GInputStream</type></link> and 
<link linkend="GOutputStream"><type>GOutputStream</type></link>).
</para>
<para>
To construct a <link linkend="GFile"><type>GFile</type></link>, you can use: 
<link linkend="g-file-new-for-path"><function>g_file_new_for_path()</function></link> if you have a path.
<link linkend="g-file-new-for-uri"><function>g_file_new_for_uri()</function></link> if you have a URI.
<link linkend="g-file-new-for-commandline-arg"><function>g_file_new_for_commandline_arg()</function></link> for a command line argument.
<link linkend="g-file-parse-name"><function>g_file_parse_name()</function></link> from a utf8 string gotten from <link linkend="g-file-get-parse-name"><function>g_file_get_parse_name()</function></link>.
</para>
<para>
One way to think of a <link linkend="GFile"><type>GFile</type></link> is as an abstraction of a pathname. For normal
files the system pathname is what is stored internally, but as <link linkend="GFile"><type>GFile</type></link><!-- -->s
are extensible it could also be something else that corresponds to a pathname
in a userspace implementation of a filesystem.
</para>
<para>
<link linkend="GFile"><type>GFile</type></link><!-- -->s make up hierarchies of directories and files that correspond to the
files on a filesystem. You can move through the file system with <link linkend="GFile"><type>GFile</type></link> using
<link linkend="g-file-get-parent"><function>g_file_get_parent()</function></link> to get an identifier for the parent directory, <link linkend="g-file-get-child"><function>g_file_get_child()</function></link>
to get a child within a directory, <link linkend="g-file-resolve-relative-path"><function>g_file_resolve_relative_path()</function></link> to resolve a relative
path between two <link linkend="GFile"><type>GFile</type></link><!-- -->s. There can be multiple hierarchies, so you may not
end up at the same root if you repeatedly call <link linkend="g-file-get-parent"><function>g_file_get_parent()</function></link> on two different
files.
</para>
<para>
All <link linkend="GFile"><type>GFile</type></link><!-- -->s have a basename (get with <link linkend="g-file-get-basename"><function>g_file_get_basename()</function></link>). These names
are byte strings that are used to identify the file on the filesystem (relative to
its parent directory) and there is no guarantees that they have any particular charset
encoding or even make any sense at all. If you want to use filenames in a user
interface you should use the display name that you can get by requesting the
<link linkend="G-FILE-ATTRIBUTE-STANDARD-DISPLAY-NAME--CAPS"><literal>G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</literal></link> attribute with <link linkend="g-file-query-info"><function>g_file_query_info()</function></link>.
This is guaranteed to be in utf8 and can be used in a user interface. But always
store the real basename or the <link linkend="GFile"><type>GFile</type></link> to use to actually access the file, because
there is no way to go from a display name to the actual name.
</para>
<para>
Using <link linkend="GFile"><type>GFile</type></link> as an identifier has the same weaknesses as using a path in that
there may be multiple aliases for the same file. For instance, hard or
soft links may cause two different <link linkend="GFile"><type>GFile</type></link><!-- -->s to refer to the same file.
Other possible causes for aliases are: case insensitive filesystems, short
and long names on Fat/NTFS, or bind mounts in Linux. If you want to check if
two <link linkend="GFile"><type>GFile</type></link><!-- -->s point to the same file you can query for the
<link linkend="G-FILE-ATTRIBUTE-ID-FILE--CAPS"><literal>G_FILE_ATTRIBUTE_ID_FILE</literal></link> attribute. Note that <link linkend="GFile"><type>GFile</type></link> does some trivial
canonicalization of pathnames passed in, so that trivial differences in the
path string used at creation (duplicated slashes, slash at end of path, "."
or ".." path segments, etc) does not create different <link linkend="GFile"><type>GFile</type></link><!-- -->s.
</para>
<para>
Many <link linkend="GFile"><type>GFile</type></link> operations have both synchronous and asynchronous versions 
to suit your application. Asynchronous versions of synchronous functions 
simply have <link linkend="async"><function>_async()</function></link> appended to their function names. The asynchronous 
I/O functions call a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> which is then used to finalize 
the operation, producing a GAsyncResult which is then passed to the 
function's matching <link linkend="finish"><function>_finish()</function></link> operation. 
</para>
<para>
Some <link linkend="GFile"><type>GFile</type></link> operations do not have synchronous analogs, as they may
take a very long time to finish, and blocking may leave an application
unusable. Notable cases include:
<link linkend="g-file-mount-mountable"><function>g_file_mount_mountable()</function></link> to mount a mountable file.
<link linkend="g-file-unmount-mountable-with-operation"><function>g_file_unmount_mountable_with_operation()</function></link> to unmount a mountable file.
<link linkend="g-file-eject-mountable-with-operation"><function>g_file_eject_mountable_with_operation()</function></link> to eject a mountable file.
</para>
<para>
<para id="gfile-etag"><indexterm><primary>entity tag</primary></indexterm>
One notable feature of <link linkend="GFile"><type>GFile</type></link><!-- -->s are entity tags, or "etags" for 
short. Entity tags are somewhat like a more abstract version of the 
traditional mtime, and can be used to quickly determine if the file has
been modified from the version on the file system. See the HTTP 1.1 
<ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">specification</ulink>
for HTTP Etag headers, which are a very similar concept.
</para></para>
<para>
</para>
</refsect1>

<refsect1 id="GFile.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GFile-struct" role="struct">
<title>GFile</title>
<indexterm zone="GFile-struct"><primary sortas="File">GFile</primary></indexterm><programlisting>typedef struct _GFile GFile;</programlisting>
<para>
A handle to an object implementing the <link linkend="GFileIface"><type>GFileIface</type></link> interface.
Generally stores a location within the file system. Handles do not
necessarily represent files or directories that currently exist.</para>
<para>
</para></refsect2>
<refsect2 id="GFileIface" role="struct">
<title>GFileIface</title>
<indexterm zone="GFileIface"><primary sortas="FileIface">GFileIface</primary></indexterm><programlisting>typedef struct {
  GTypeInterface g_iface;

  /* Virtual Table */

  GFile *             (* dup)                         (GFile         *file);
  guint               (* hash)                        (GFile         *file);
  gboolean            (* equal)                       (GFile         *file1,
                                                       GFile         *file2);
  gboolean            (* is_native)                   (GFile         *file);
  gboolean            (* has_uri_scheme)              (GFile         *file,
                                                       const char    *uri_scheme);
  char *              (* get_uri_scheme)              (GFile         *file);
  char *              (* get_basename)                (GFile         *file);
  char *              (* get_path)                    (GFile         *file);
  char *              (* get_uri)                     (GFile         *file);
  char *              (* get_parse_name)              (GFile         *file);
  GFile *             (* get_parent)                  (GFile         *file);
  gboolean            (* prefix_matches)              (GFile         *prefix,
                                                       GFile         *file);
  char *              (* get_relative_path)           (GFile         *parent,
                                                       GFile         *descendant);
  GFile *             (* resolve_relative_path)       (GFile        *file,
                                                       const char   *relative_path);
  GFile *             (* get_child_for_display_name)  (GFile        *file,
                                                       const char   *display_name,
                                                       GError      **error);

  GFileEnumerator *   (* enumerate_children)          (GFile                *file,
                                                       const char           *attributes,
                                                       GFileQueryInfoFlags   flags,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* enumerate_children_async)    (GFile                *file,
                                                       const char           *attributes,
                                                       GFileQueryInfoFlags   flags,
                                                       int                   io_priority,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  GFileEnumerator *   (* enumerate_children_finish)   (GFile                *file,
                                                       GAsyncResult         *res,
                                                       GError              **error);

  GFileInfo *         (* query_info)                  (GFile                *file,
                                                       const char           *attributes,
                                                       GFileQueryInfoFlags   flags,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* query_info_async)            (GFile                *file,
                                                       const char           *attributes,
                                                       GFileQueryInfoFlags   flags,
                                                       int                   io_priority,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  GFileInfo *         (* query_info_finish)           (GFile                *file,
                                                       GAsyncResult         *res,
                                                       GError              **error);

  GFileInfo *         (* query_filesystem_info)       (GFile                *file,
                                                       const char           *attributes,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* query_filesystem_info_async) (GFile                *file,
                                                       const char           *attributes,
                                                       int                   io_priority,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  GFileInfo *         (* query_filesystem_info_finish)(GFile                *file,
                                                       GAsyncResult         *res,
                                                       GError              **error);

  GMount *            (* find_enclosing_mount)        (GFile                *file,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* find_enclosing_mount_async)  (GFile                *file,
                                                       int                   io_priority,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  GMount *            (* find_enclosing_mount_finish) (GFile                *file,
                                                       GAsyncResult         *res,
                                                       GError              **error);

  GFile *             (* set_display_name)            (GFile                *file,
                                                       const char           *display_name,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* set_display_name_async)      (GFile                *file,
                                                       const char           *display_name,
                                                       int                   io_priority,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  GFile *             (* set_display_name_finish)     (GFile                *file,
                                                       GAsyncResult         *res,
                                                       GError              **error);

  GFileAttributeInfoList * (* query_settable_attributes)    (GFile          *file,
                                                             GCancellable   *cancellable,
                                                             GError        **error);
  void                (* _query_settable_attributes_async)  (void);
  void                (* _query_settable_attributes_finish) (void);

  GFileAttributeInfoList * (* query_writable_namespaces)    (GFile          *file,
                                                             GCancellable   *cancellable,
                                                             GError        **error);
  void                (* _query_writable_namespaces_async)  (void);
  void                (* _query_writable_namespaces_finish) (void);

  gboolean            (* set_attribute)               (GFile                *file,
                                                       const char           *attribute,
                                                       GFileAttributeType    type,
                                                       gpointer              value_p,
                                                       GFileQueryInfoFlags   flags,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  gboolean            (* set_attributes_from_info)    (GFile                *file,
                                                       GFileInfo            *info,
                                                       GFileQueryInfoFlags   flags,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* set_attributes_async)        (GFile                *file,
                                                       GFileInfo            *info,
                                                       GFileQueryInfoFlags   flags,
                                                       int                   io_priority,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  gboolean            (* set_attributes_finish)       (GFile                *file,
                                                       GAsyncResult         *result,
                                                       GFileInfo           **info,
                                                       GError              **error);

  GFileInputStream *  (* read_fn)                     (GFile                *file,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* read_async)                  (GFile                *file,
                                                       int                   io_priority,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  GFileInputStream *  (* read_finish)                 (GFile                *file,
                                                       GAsyncResult         *res,
                                                       GError              **error);

  GFileOutputStream * (* append_to)                   (GFile                *file,
                                                       GFileCreateFlags      flags,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* append_to_async)             (GFile                *file,
                                                       GFileCreateFlags      flags,
                                                       int                   io_priority,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  GFileOutputStream * (* append_to_finish)            (GFile                *file,
                                                       GAsyncResult         *res,
                                                       GError              **error);

  GFileOutputStream * (* create)                      (GFile                *file,
                                                       GFileCreateFlags      flags,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* create_async)                (GFile                *file,
                                                       GFileCreateFlags      flags,
                                                       int                   io_priority,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  GFileOutputStream * (* create_finish)               (GFile                *file,
                                                       GAsyncResult         *res,
                                                       GError              **error);

  GFileOutputStream * (* replace)                     (GFile                *file,
                                                       const char           *etag,
                                                       gboolean              make_backup,
                                                       GFileCreateFlags      flags,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* replace_async)               (GFile                *file,
                                                       const char           *etag,
                                                       gboolean              make_backup,
                                                       GFileCreateFlags      flags,
                                                       int                   io_priority,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  GFileOutputStream * (* replace_finish)              (GFile                *file,
                                                       GAsyncResult         *res,
                                                       GError              **error);

  gboolean            (* delete_file)                 (GFile                *file,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* _delete_file_async)          (void);
  void                (* _delete_file_finish)         (void);

  gboolean            (* trash)                       (GFile                *file,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* _trash_async)                (void);
  void                (* _trash_finish)               (void);

  gboolean            (* make_directory)              (GFile                *file,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* _make_directory_async)       (void);
  void                (* _make_directory_finish)      (void);

  gboolean            (* make_symbolic_link)          (GFile                *file,
                                                       const char           *symlink_value,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* _make_symbolic_link_async)   (void);
  void                (* _make_symbolic_link_finish)  (void);

  gboolean            (* copy)                        (GFile                *source,
                                                       GFile                *destination,
                                                       GFileCopyFlags        flags,
                                                       GCancellable         *cancellable,
                                                       GFileProgressCallback progress_callback,
                                                       gpointer              progress_callback_data,
                                                       GError              **error);
  void                (* copy_async)                  (GFile                *source,
                                                       GFile                *destination,
                                                       GFileCopyFlags        flags,
                                                       int                   io_priority,
                                                       GCancellable         *cancellable,
                                                       GFileProgressCallback progress_callback,
                                                       gpointer              progress_callback_data,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  gboolean            (* copy_finish)                 (GFile                *file,
                                                       GAsyncResult         *res,
                                                       GError              **error);

  gboolean            (* move)                        (GFile                *source,
                                                       GFile                *destination,
                                                       GFileCopyFlags        flags,
                                                       GCancellable         *cancellable,
                                                       GFileProgressCallback progress_callback,
                                                       gpointer              progress_callback_data,
                                                       GError              **error);
  void                (* _move_async)                 (void);
  void                (* _move_finish)                (void);

  void                (* mount_mountable)             (GFile                *file,
                                                       GMountMountFlags      flags,
                                                       GMountOperation      *mount_operation,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  GFile *             (* mount_mountable_finish)      (GFile                *file,
                                                       GAsyncResult         *result,
                                                       GError              **error);

  void                (* unmount_mountable)           (GFile                *file,
                                                       GMountUnmountFlags    flags,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  gboolean            (* unmount_mountable_finish)    (GFile                *file,
                                                       GAsyncResult         *result,
                                                       GError              **error);

  void                (* eject_mountable)             (GFile                *file,
                                                       GMountUnmountFlags    flags,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  gboolean            (* eject_mountable_finish)      (GFile                *file,
                                                       GAsyncResult         *result,
                                                       GError              **error);

  void                (* mount_enclosing_volume)      (GFile                *location,
                                                       GMountMountFlags      flags,
                                                       GMountOperation      *mount_operation,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  gboolean         (* mount_enclosing_volume_finish)  (GFile                *location,
                                                       GAsyncResult         *result,
                                                       GError              **error);

  GFileMonitor *      (* monitor_dir)                 (GFile                *file,
                                                       GFileMonitorFlags     flags,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  GFileMonitor *      (* monitor_file)                (GFile                *file,
                                                       GFileMonitorFlags     flags,
                                                       GCancellable         *cancellable,
                                                       GError              **error);

  GFileIOStream *     (* open_readwrite)              (GFile                *file,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* open_readwrite_async)        (GFile                *file,
                                                       int                   io_priority,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  GFileIOStream *     (* open_readwrite_finish)       (GFile                *file,
                                                       GAsyncResult         *res,
                                                       GError              **error);
  GFileIOStream *     (* create_readwrite)            (GFile                *file,
						       GFileCreateFlags      flags,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* create_readwrite_async)      (GFile                *file,
						       GFileCreateFlags      flags,
                                                       int                   io_priority,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  GFileIOStream *     (* create_readwrite_finish)      (GFile                *file,
                                                       GAsyncResult         *res,
                                                       GError              **error);
  GFileIOStream *     (* replace_readwrite)           (GFile                *file,
                                                       const char           *etag,
                                                       gboolean              make_backup,
                                                       GFileCreateFlags      flags,
                                                       GCancellable         *cancellable,
                                                       GError              **error);
  void                (* replace_readwrite_async)     (GFile                *file,
                                                       const char           *etag,
                                                       gboolean              make_backup,
                                                       GFileCreateFlags      flags,
                                                       int                   io_priority,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  GFileIOStream *     (* replace_readwrite_finish)    (GFile                *file,
                                                       GAsyncResult         *res,
                                                       GError              **error);

  void                (* start_mountable)             (GFile                *file,
                                                       GDriveStartFlags      flags,
                                                       GMountOperation      *start_operation,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  gboolean            (* start_mountable_finish)      (GFile                *file,
                                                       GAsyncResult         *result,
                                                       GError              **error);

  void                (* stop_mountable)              (GFile                *file,
                                                       GMountUnmountFlags    flags,
                                                       GMountOperation      *mount_operation,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  gboolean            (* stop_mountable_finish)       (GFile                *file,
                                                       GAsyncResult         *result,
                                                       GError              **error);

  gboolean            supports_thread_contexts;

  void                (* unmount_mountable_with_operation) (GFile           *file,
                                                       GMountUnmountFlags    flags,
                                                       GMountOperation      *mount_operation,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  gboolean            (* unmount_mountable_with_operation_finish) (GFile    *file,
                                                       GAsyncResult         *result,
                                                       GError              **error);

  void                (* eject_mountable_with_operation) (GFile             *file,
                                                       GMountUnmountFlags    flags,
                                                       GMountOperation      *mount_operation,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  gboolean            (* eject_mountable_with_operation_finish) (GFile      *file,
                                                       GAsyncResult         *result,
                                                       GError              **error);

  void                (* poll_mountable)              (GFile                *file,
                                                       GCancellable         *cancellable,
                                                       GAsyncReadyCallback   callback,
                                                       gpointer              user_data);
  gboolean            (* poll_mountable_finish)       (GFile                *file,
                                                       GAsyncResult         *result,
                                                       GError              **error);
} GFileIface;
</programlisting>
<para>
An interface for writing VFS file handles.</para>
<para>
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="GTypeInterface">GTypeInterface</link>&#160;<structfield>g_iface</structfield>;</term>
<listitem><simpara> The parent interface.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>dup</structfield>&#160;()</term>
<listitem><simpara> Duplicates a <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>hash</structfield>&#160;()</term>
<listitem><simpara> Creates a hash of a <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>equal</structfield>&#160;()</term>
<listitem><simpara> Checks equality of two given <link linkend="GFile"><type>GFile</type></link><!-- -->s.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>is_native</structfield>&#160;()</term>
<listitem><simpara> Checks to see if a file is native to the system.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>has_uri_scheme</structfield>&#160;()</term>
<listitem><simpara> Checks to see if a <link linkend="GFile"><type>GFile</type></link> has a given URI scheme.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>get_uri_scheme</structfield>&#160;()</term>
<listitem><simpara> Gets the URI scheme for a <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>get_basename</structfield>&#160;()</term>
<listitem><simpara> Gets the basename for a given <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>get_path</structfield>&#160;()</term>
<listitem><simpara> Gets the current path within a <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>get_uri</structfield>&#160;()</term>
<listitem><simpara> Gets a URI for the path within a <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>get_parse_name</structfield>&#160;()</term>
<listitem><simpara> Gets the parsed name for the <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>get_parent</structfield>&#160;()</term>
<listitem><simpara> Gets the parent directory for the <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>prefix_matches</structfield>&#160;()</term>
<listitem><simpara> Checks whether a <link linkend="GFile"><type>GFile</type></link> contains a specified file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>get_relative_path</structfield>&#160;()</term>
<listitem><simpara> Gets the path for a <link linkend="GFile"><type>GFile</type></link> relative to a given path.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>resolve_relative_path</structfield>&#160;()</term>
<listitem><simpara> Resolves a relative path for a <link linkend="GFile"><type>GFile</type></link> to an absolute path.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>get_child_for_display_name</structfield>&#160;()</term>
<listitem><simpara> Gets the child <link linkend="GFile"><type>GFile</type></link> for a given display name.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>enumerate_children</structfield>&#160;()</term>
<listitem><simpara> Gets a <link linkend="GFileEnumerator"><type>GFileEnumerator</type></link> with the children of a <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>enumerate_children_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously gets a <link linkend="GFileEnumerator"><type>GFileEnumerator</type></link> with the children of a <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>enumerate_children_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes asynchronously enumerating the children.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>query_info</structfield>&#160;()</term>
<listitem><simpara> Gets the <link linkend="GFileInfo"><type>GFileInfo</type></link> for a <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>query_info_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously gets the <link linkend="GFileInfo"><type>GFileInfo</type></link> for a <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>query_info_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an asynchronous query info operation.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>query_filesystem_info</structfield>&#160;()</term>
<listitem><simpara> Gets a <link linkend="GFileInfo"><type>GFileInfo</type></link> for the file system <link linkend="GFile"><type>GFile</type></link> is on.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>query_filesystem_info_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously gets a <link linkend="GFileInfo"><type>GFileInfo</type></link> for the file system <link linkend="GFile"><type>GFile</type></link> is on.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>query_filesystem_info_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes asynchronously getting the file system info.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>find_enclosing_mount</structfield>&#160;()</term>
<listitem><simpara> Gets a <link linkend="GMount"><type>GMount</type></link> for the <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>find_enclosing_mount_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously gets the <link linkend="GMount"><type>GMount</type></link> for a <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>find_enclosing_mount_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes asynchronously getting the volume.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>set_display_name</structfield>&#160;()</term>
<listitem><simpara> Sets the display name for a <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>set_display_name_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously sets a <link linkend="GFile"><type>GFile</type></link>'s display name.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>set_display_name_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes asynchronously setting a <link linkend="GFile"><type>GFile</type></link>'s display name.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>query_settable_attributes</structfield>&#160;()</term>
<listitem><simpara> Returns a list of <link linkend="GFileAttribute"><type>GFileAttribute</type></link><!-- -->s that can be set.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>_query_settable_attributes_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously gets a list of <link linkend="GFileAttribute"><type>GFileAttribute</type></link><!-- -->s that can be set.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>_query_settable_attributes_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes asynchronously querying settable attributes.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>query_writable_namespaces</structfield>&#160;()</term>
<listitem><simpara> Returns a list of <link linkend="GFileAttribute"><type>GFileAttribute</type></link> namespaces that are writable.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>_query_writable_namespaces_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously gets a list of <link linkend="GFileAttribute"><type>GFileAttribute</type></link> namespaces that are writable.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>_query_writable_namespaces_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes asynchronously querying the writable namespaces.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>set_attribute</structfield>&#160;()</term>
<listitem><simpara> Sets a <link linkend="GFileAttribute"><type>GFileAttribute</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>set_attributes_from_info</structfield>&#160;()</term>
<listitem><simpara> Sets a <link linkend="GFileAttribute"><type>GFileAttribute</type></link> with information from a <link linkend="GFileInfo"><type>GFileInfo</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>set_attributes_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously sets a file's attributes.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>set_attributes_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes setting a file's attributes asynchronously.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>read_fn</structfield>&#160;()</term>
<listitem><simpara> Reads a file asynchronously.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>read_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously reads a file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>read_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes asynchronously reading a file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>append_to</structfield>&#160;()</term>
<listitem><simpara> Writes to the end of a file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>append_to_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously writes to the end of a file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>append_to_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an asynchronous file append operation.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>create</structfield>&#160;()</term>
<listitem><simpara> Creates a new file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>create_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously creates a file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>create_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes asynchronously creating a file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>replace</structfield>&#160;()</term>
<listitem><simpara> Replaces the contents of a file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>replace_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously replaces the contents of a file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>replace_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes asynchronously replacing a file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>delete_file</structfield>&#160;()</term>
<listitem><simpara> Deletes a file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>_delete_file_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously deletes a file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>_delete_file_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an asynchronous delete.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>trash</structfield>&#160;()</term>
<listitem><simpara> Sends a <link linkend="GFile"><type>GFile</type></link> to the Trash location.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>_trash_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously sends a <link linkend="GFile"><type>GFile</type></link> to the Trash location.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>_trash_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an asynchronous file trashing operation.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>make_directory</structfield>&#160;()</term>
<listitem><simpara> Makes a directory.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>_make_directory_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously makes a directory.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>_make_directory_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes making a directory asynchronously.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>make_symbolic_link</structfield>&#160;()</term>
<listitem><simpara> Makes a symbolic link.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>_make_symbolic_link_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously makes a symbolic link
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>_make_symbolic_link_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes making a symbolic link asynchronously.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>copy</structfield>&#160;()</term>
<listitem><simpara> Copies a file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>copy_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously copies a file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>copy_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an asynchronous copy operation.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>move</structfield>&#160;()</term>
<listitem><simpara> Moves a file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>_move_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously moves a file.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>_move_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an asynchronous move operation.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>mount_mountable</structfield>&#160;()</term>
<listitem><simpara> Mounts a mountable object.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>mount_mountable_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes a mounting operation.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>unmount_mountable</structfield>&#160;()</term>
<listitem><simpara> Unmounts a mountable object.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>unmount_mountable_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an unmount operation.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>eject_mountable</structfield>&#160;()</term>
<listitem><simpara> Ejects a mountable.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>eject_mountable_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an eject operation.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>mount_enclosing_volume</structfield>&#160;()</term>
<listitem><simpara> Mounts a specified location.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>mount_enclosing_volume_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes mounting a specified location.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>monitor_dir</structfield>&#160;()</term>
<listitem><simpara> Creates a <link linkend="GFileMonitor"><type>GFileMonitor</type></link> for the location.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>monitor_file</structfield>&#160;()</term>
<listitem><simpara> Creates a <link linkend="GFileMonitor"><type>GFileMonitor</type></link> for the location.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>open_readwrite</structfield>&#160;()</term>
<listitem><simpara> Open file read/write. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>open_readwrite_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously opens file read/write. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>open_readwrite_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an asynchronous open read/write. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>create_readwrite</structfield>&#160;()</term>
<listitem><simpara> Creates file read/write. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>create_readwrite_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously creates file read/write. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>create_readwrite_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an asynchronous creates read/write. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>replace_readwrite</structfield>&#160;()</term>
<listitem><simpara> Replaces file read/write. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>replace_readwrite_async</structfield>&#160;()</term>
<listitem><simpara> Asynchronously replaces file read/write. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>replace_readwrite_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an asynchronous replace read/write. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>start_mountable</structfield>&#160;()</term>
<listitem><simpara> Starts a mountable object. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>start_mountable_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an start operation. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>stop_mountable</structfield>&#160;()</term>
<listitem><simpara> Stops a mountable. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>stop_mountable_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an stop operation. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="gboolean">gboolean</link>&#160;<structfield>supports_thread_contexts</structfield>;</term>
<listitem><simpara> a boolean that indicates whether the <link linkend="GFile"><type>GFile</type></link> implementation supports thread-default contexts. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>unmount_mountable_with_operation</structfield>&#160;()</term>
<listitem><simpara> Unmounts a mountable object using a <link linkend="GMountOperation"><type>GMountOperation</type></link>. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>unmount_mountable_with_operation_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an unmount operation using a <link linkend="GMountOperation"><type>GMountOperation</type></link>. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>eject_mountable_with_operation</structfield>&#160;()</term>
<listitem><simpara> Ejects a mountable object using a <link linkend="GMountOperation"><type>GMountOperation</type></link>. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>eject_mountable_with_operation_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an eject operation using a <link linkend="GMountOperation"><type>GMountOperation</type></link>. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>poll_mountable</structfield>&#160;()</term>
<listitem><simpara> Polls a mountable object for media changes. Since 2.22.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>poll_mountable_finish</structfield>&#160;()</term>
<listitem><simpara> Finishes an poll operation for media changes. Since 2.22.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GFileQueryInfoFlags" role="enum">
<title>enum GFileQueryInfoFlags</title>
<indexterm zone="GFileQueryInfoFlags"><primary sortas="FileQueryInfoFlags">GFileQueryInfoFlags</primary></indexterm><programlisting>typedef enum {
  G_FILE_QUERY_INFO_NONE              = 0,
  G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1 &lt;&lt; 0)   /*&lt; nick=nofollow-symlinks &gt;*/
} GFileQueryInfoFlags;
</programlisting>
<para>
Flags used when querying a <link linkend="GFileInfo"><type>GFileInfo</type></link>.</para>
<para>
</para><variablelist role="enum">
<varlistentry id="G-FILE-QUERY-INFO-NONE--CAPS" role="constant">
<term><literal>G_FILE_QUERY_INFO_NONE</literal></term>
<listitem><simpara> No flags set.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-FILE-QUERY-INFO-NOFOLLOW-SYMLINKS--CAPS" role="constant">
<term><literal>G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS</literal></term>
<listitem><simpara> Don't follow symlinks.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GFileCreateFlags" role="enum">
<title>enum GFileCreateFlags</title>
<indexterm zone="GFileCreateFlags"><primary sortas="FileCreateFlags">GFileCreateFlags</primary></indexterm><programlisting>typedef enum {
  G_FILE_CREATE_NONE    = 0,
  G_FILE_CREATE_PRIVATE = (1 &lt;&lt; 0),
  G_FILE_CREATE_REPLACE_DESTINATION = (1 &lt;&lt; 1)
} GFileCreateFlags;
</programlisting>
<para>
Flags used when an operation may create a file.</para>
<para>
</para><variablelist role="enum">
<varlistentry id="G-FILE-CREATE-NONE--CAPS" role="constant">
<term><literal>G_FILE_CREATE_NONE</literal></term>
<listitem><simpara> No flags set.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-FILE-CREATE-PRIVATE--CAPS" role="constant">
<term><literal>G_FILE_CREATE_PRIVATE</literal></term>
<listitem><simpara> Create a file that can only be
   accessed by the current user.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-FILE-CREATE-REPLACE-DESTINATION--CAPS" role="constant">
<term><literal>G_FILE_CREATE_REPLACE_DESTINATION</literal></term>
<listitem><simpara> Replace the destination
   as if it didn't exist before. Don't try to keep any old
   permissions, replace instead of following links. This
   is generally useful if you're doing a "copy over" 
   rather than a "save new version of" replace operation.
   You can think of it as "unlink destination" before
   writing to it, although the implementation may not
   be exactly like that. Since 2.20
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GFileCopyFlags" role="enum">
<title>enum GFileCopyFlags</title>
<indexterm zone="GFileCopyFlags"><primary sortas="FileCopyFlags">GFileCopyFlags</primary></indexterm><programlisting>typedef enum {
  G_FILE_COPY_NONE                 = 0,          /*&lt; nick=none &gt;*/
  G_FILE_COPY_OVERWRITE            = (1 &lt;&lt; 0),
  G_FILE_COPY_BACKUP               = (1 &lt;&lt; 1),
  G_FILE_COPY_NOFOLLOW_SYMLINKS    = (1 &lt;&lt; 2),
  G_FILE_COPY_ALL_METADATA         = (1 &lt;&lt; 3),
  G_FILE_COPY_NO_FALLBACK_FOR_MOVE = (1 &lt;&lt; 4),
  G_FILE_COPY_TARGET_DEFAULT_PERMS = (1 &lt;&lt; 5)
} GFileCopyFlags;
</programlisting>
<para>
Flags used when copying or moving files.</para>
<para>
</para><variablelist role="enum">
<varlistentry id="G-FILE-COPY-NONE--CAPS" role="constant">
<term><literal>G_FILE_COPY_NONE</literal></term>
<listitem><simpara> No flags set.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-FILE-COPY-OVERWRITE--CAPS" role="constant">
<term><literal>G_FILE_COPY_OVERWRITE</literal></term>
<listitem><simpara> Overwrite any existing files
</simpara></listitem>
</varlistentry>
<varlistentry id="G-FILE-COPY-BACKUP--CAPS" role="constant">
<term><literal>G_FILE_COPY_BACKUP</literal></term>
<listitem><simpara> Make a backup of any existing files.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-FILE-COPY-NOFOLLOW-SYMLINKS--CAPS" role="constant">
<term><literal>G_FILE_COPY_NOFOLLOW_SYMLINKS</literal></term>
<listitem><simpara> Don't follow symlinks.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-FILE-COPY-ALL-METADATA--CAPS" role="constant">
<term><literal>G_FILE_COPY_ALL_METADATA</literal></term>
<listitem><simpara> Copy all file metadata instead of just default set used for copy (see <link linkend="GFileInfo"><type>GFileInfo</type></link>).
</simpara></listitem>
</varlistentry>
<varlistentry id="G-FILE-COPY-NO-FALLBACK-FOR-MOVE--CAPS" role="constant">
<term><literal>G_FILE_COPY_NO_FALLBACK_FOR_MOVE</literal></term>
<listitem><simpara> Don't use copy and delete fallback if native move not supported.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-FILE-COPY-TARGET-DEFAULT-PERMS--CAPS" role="constant">
<term><literal>G_FILE_COPY_TARGET_DEFAULT_PERMS</literal></term>
<listitem><simpara> Leaves target file with default perms, instead of setting the source file perms.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GFileMonitorFlags" role="enum">
<title>enum GFileMonitorFlags</title>
<indexterm zone="GFileMonitorFlags"><primary sortas="FileMonitorFlags">GFileMonitorFlags</primary></indexterm><programlisting>typedef enum {
  G_FILE_MONITOR_NONE         = 0,
  G_FILE_MONITOR_WATCH_MOUNTS = (1 &lt;&lt; 0)
} GFileMonitorFlags;
</programlisting>
<para>
Flags used to set what a <link linkend="GFileMonitor"><type>GFileMonitor</type></link> will watch for.</para>
<para>
</para><variablelist role="enum">
<varlistentry id="G-FILE-MONITOR-NONE--CAPS" role="constant">
<term><literal>G_FILE_MONITOR_NONE</literal></term>
<listitem><simpara> No flags set.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-FILE-MONITOR-WATCH-MOUNTS--CAPS" role="constant">
<term><literal>G_FILE_MONITOR_WATCH_MOUNTS</literal></term>
<listitem><simpara> Watch for mount events.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GFilesystemPreviewType" role="enum">
<title>enum GFilesystemPreviewType</title>
<indexterm zone="GFilesystemPreviewType"><primary sortas="FilesystemPreviewType">GFilesystemPreviewType</primary></indexterm><programlisting>typedef enum {
  G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS = 0,
  G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL,
  G_FILESYSTEM_PREVIEW_TYPE_NEVER
} GFilesystemPreviewType;
</programlisting>
<para>
Indicates a hint from the file system whether files should be
previewed in a file manager. Returned as the value of the key
<link linkend="G-FILE-ATTRIBUTE-FILESYSTEM-USE-PREVIEW--CAPS"><type>G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW</type></link>.</para>
<para>
</para><variablelist role="enum">
<varlistentry id="G-FILESYSTEM-PREVIEW-TYPE-IF-ALWAYS--CAPS" role="constant">
<term><literal>G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS</literal></term>
<listitem><simpara> Only preview files if user has explicitly requested it.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-FILESYSTEM-PREVIEW-TYPE-IF-LOCAL--CAPS" role="constant">
<term><literal>G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL</literal></term>
<listitem><simpara> Preview files if user has requested preview of "local" files.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-FILESYSTEM-PREVIEW-TYPE-NEVER--CAPS" role="constant">
<term><literal>G_FILESYSTEM_PREVIEW_TYPE_NEVER</literal></term>
<listitem><simpara> Never preview files.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GFileProgressCallback" role="function">
<title>GFileProgressCallback ()</title>
<indexterm zone="GFileProgressCallback"><primary sortas="FileProgressCallback">GFileProgressCallback</primary></indexterm><programlisting><link linkend="void">void</link>                (*GFileProgressCallback)            (<link linkend="goffset">goffset</link> current_num_bytes,
                                                         <link linkend="goffset">goffset</link> total_num_bytes,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
When doing file operations that may take a while, such as moving
a file or copying a file, a progress callback is used to pass how
far along that operation is to the application.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>current_num_bytes</parameter>&#160;:</term>
<listitem><simpara> the current number of bytes in the operation.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>total_num_bytes</parameter>&#160;:</term>
<listitem><simpara> the total number of bytes in the operation.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> user data passed to the callback.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GFileReadMoreCallback" role="function">
<title>GFileReadMoreCallback ()</title>
<indexterm zone="GFileReadMoreCallback"><primary sortas="FileReadMoreCallback">GFileReadMoreCallback</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            (*GFileReadMoreCallback)            (const <link linkend="char">char</link> *file_contents,
                                                         <link linkend="goffset">goffset</link> file_size,
                                                         <link linkend="gpointer">gpointer</link> callback_data);</programlisting>
<para>
When loading the partial contents of a file with <link linkend="g-file-load-partial-contents-async"><function>g_file_load_partial_contents_async()</function></link>,
it may become necessary to determine if any more data from the file should be loaded.
A <link linkend="GFileReadMoreCallback"><type>GFileReadMoreCallback</type></link> function facilitates this by returning <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if more data
should be read, or <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file_contents</parameter>&#160;:</term>
<listitem><simpara> the data as currently read.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>file_size</parameter>&#160;:</term>
<listitem><simpara> the size of the data currently read.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback_data</parameter>&#160;:</term>
<listitem><simpara> data passed to the callback.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if more data should be read back. <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-new-for-path" role="function">
<title>g_file_new_for_path ()</title>
<indexterm zone="g-file-new-for-path"><primary sortas="file_new_for_path">g_file_new_for_path</primary></indexterm><programlisting><link linkend="GFile">GFile</link> *             g_file_new_for_path                 (const <link linkend="char">char</link> *path);</programlisting>
<para>
Constructs a <link linkend="GFile"><type>GFile</type></link> for a given path. This operation never
fails, but the returned object might not support any I/O
operation if <parameter>path</parameter> is malformed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>path</parameter>&#160;:</term>
<listitem><simpara> a string containing a relative or absolute path.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GFile"><type>GFile</type></link> for the given <parameter>path</parameter>. 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-new-for-uri" role="function">
<title>g_file_new_for_uri ()</title>
<indexterm zone="g-file-new-for-uri"><primary sortas="file_new_for_uri">g_file_new_for_uri</primary></indexterm><programlisting><link linkend="GFile">GFile</link> *             g_file_new_for_uri                  (const <link linkend="char">char</link> *uri);</programlisting>
<para>
Constructs a <link linkend="GFile"><type>GFile</type></link> for a given URI. This operation never 
fails, but the returned object might not support any I/O 
operation if <parameter>uri</parameter> is malformed or if the uri type is 
not supported.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&#160;:</term>
<listitem><simpara> a string containing a URI.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFile"><type>GFile</type></link> for the given <parameter>uri</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-new-for-commandline-arg" role="function">
<title>g_file_new_for_commandline_arg ()</title>
<indexterm zone="g-file-new-for-commandline-arg"><primary sortas="file_new_for_commandline_arg">g_file_new_for_commandline_arg</primary></indexterm><programlisting><link linkend="GFile">GFile</link> *             g_file_new_for_commandline_arg      (const <link linkend="char">char</link> *arg);</programlisting>
<para>
Creates a <link linkend="GFile"><type>GFile</type></link> with the given argument from the command line. The value of
<parameter>arg</parameter> can be either a URI, an absolute path or a relative path resolved
relative to the current working directory.
This operation never fails, but the returned object might not support any
I/O operation if <parameter>arg</parameter> points to a malformed path.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>arg</parameter>&#160;:</term>
<listitem><simpara> a command line string.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GFile"><type>GFile</type></link>. 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-parse-name" role="function">
<title>g_file_parse_name ()</title>
<indexterm zone="g-file-parse-name"><primary sortas="file_parse_name">g_file_parse_name</primary></indexterm><programlisting><link linkend="GFile">GFile</link> *             g_file_parse_name                   (const <link linkend="char">char</link> *parse_name);</programlisting>
<para>
Constructs a <link linkend="GFile"><type>GFile</type></link> with the given <parameter>parse_name</parameter> (i.e. something given by <link linkend="g-file-get-parse-name"><function>g_file_get_parse_name()</function></link>).
This operation never fails, but the returned object might not support any I/O
operation if the <parameter>parse_name</parameter> cannot be parsed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>parse_name</parameter>&#160;:</term>
<listitem><simpara> a file name or path to be parsed.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-dup" role="function">
<title>g_file_dup ()</title>
<indexterm zone="g-file-dup"><primary sortas="file_dup">g_file_dup</primary></indexterm><programlisting><link linkend="GFile">GFile</link> *             g_file_dup                          (<link linkend="GFile">GFile</link> *file);</programlisting>
<para>
Duplicates a <link linkend="GFile"><type>GFile</type></link> handle. This operation does not duplicate 
the actual file or directory represented by the <link linkend="GFile"><type>GFile</type></link>; see 
<link linkend="g-file-copy"><function>g_file_copy()</function></link> if attempting to copy a file. 
</para>
<para>
This call does no blocking i/o.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GFile"><type>GFile</type></link> that is a duplicate of the given <link linkend="GFile"><type>GFile</type></link>. 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-hash" role="function">
<title>g_file_hash ()</title>
<indexterm zone="g-file-hash"><primary sortas="file_hash">g_file_hash</primary></indexterm><programlisting><link linkend="guint">guint</link>               g_file_hash                         (<link linkend="gconstpointer">gconstpointer</link> file);</programlisting>
<para>
Creates a hash value for a <link linkend="GFile"><type>GFile</type></link>.
</para>
<para>
This call does no blocking i/o.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> <link linkend="gconstpointer"><type>gconstpointer</type></link> to a <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> 0 if <parameter>file</parameter> is not a valid <link linkend="GFile"><type>GFile</type></link>, otherwise an 
    integer that can be used as hash value for the <link linkend="GFile"><type>GFile</type></link>. 
    This function is intended for easily hashing a <link linkend="GFile"><type>GFile</type></link> to 
    add to a <link linkend="GHashTable"><type>GHashTable</type></link> or similar data structure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-equal" role="function">
<title>g_file_equal ()</title>
<indexterm zone="g-file-equal"><primary sortas="file_equal">g_file_equal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_equal                        (<link linkend="GFile">GFile</link> *file1,
                                                         <link linkend="GFile">GFile</link> *file2);</programlisting>
<para>
Checks equality of two given <link linkend="GFile"><type>GFile</type></link><!-- -->s. Note that two
<link linkend="GFile"><type>GFile</type></link><!-- -->s that differ can still refer to the same
file on the filesystem due to various forms of filename
aliasing.
</para>
<para>
This call does no blocking i/o.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file1</parameter>&#160;:</term>
<listitem><simpara> the first <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>file2</parameter>&#160;:</term>
<listitem><simpara> the second <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if <parameter>file1</parameter> and <parameter>file2</parameter> are equal.
    <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> if either is not a <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-get-basename" role="function">
<title>g_file_get_basename ()</title>
<indexterm zone="g-file-get-basename"><primary sortas="file_get_basename">g_file_get_basename</primary></indexterm><programlisting><link linkend="char">char</link> *              g_file_get_basename                 (<link linkend="GFile">GFile</link> *file);</programlisting>
<para>
Gets the base name (the last component of the path) for a given <link linkend="GFile"><type>GFile</type></link>.
</para>
<para>
If called for the top level of a system (such as the filesystem root
or a uri like sftp://host/) it will return a single directory separator
(and on Windows, possibly a drive letter).
</para>
<para>
The base name is a byte string (*not* UTF-8). It has no defined encoding
or rules other than it may not contain zero bytes.  If you want to use
filenames in a user interface you should use the display name that you
can get by requesting the <link linkend="G-FILE-ATTRIBUTE-STANDARD-DISPLAY-NAME--CAPS"><literal>G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</literal></link>
attribute with <link linkend="g-file-query-info"><function>g_file_query_info()</function></link>.
</para>
<para>
This call does no blocking i/o.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> string containing the <link linkend="GFile"><type>GFile</type></link>'s base name, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> 
    if given <link linkend="GFile"><type>GFile</type></link> is invalid. The returned string should be 
    freed with <link linkend="g-free"><function>g_free()</function></link> when no longer needed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-get-path" role="function">
<title>g_file_get_path ()</title>
<indexterm zone="g-file-get-path"><primary sortas="file_get_path">g_file_get_path</primary></indexterm><programlisting><link linkend="char">char</link> *              g_file_get_path                     (<link linkend="GFile">GFile</link> *file);</programlisting>
<para>
Gets the local pathname for <link linkend="GFile"><type>GFile</type></link>, if one exists. 
</para>
<para>
This call does no blocking i/o.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> string containing the <link linkend="GFile"><type>GFile</type></link>'s path, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if 
    no such path exists. The returned string should be 
    freed with <link linkend="g-free"><function>g_free()</function></link> when no longer needed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-get-uri" role="function">
<title>g_file_get_uri ()</title>
<indexterm zone="g-file-get-uri"><primary sortas="file_get_uri">g_file_get_uri</primary></indexterm><programlisting><link linkend="char">char</link> *              g_file_get_uri                      (<link linkend="GFile">GFile</link> *file);</programlisting>
<para>
Gets the URI for the <parameter>file</parameter>.
</para>
<para>
This call does no blocking i/o.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a string containing the <link linkend="GFile"><type>GFile</type></link>'s URI.
    The returned string should be freed with <link linkend="g-free"><function>g_free()</function></link> when no longer needed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-get-parse-name" role="function">
<title>g_file_get_parse_name ()</title>
<indexterm zone="g-file-get-parse-name"><primary sortas="file_get_parse_name">g_file_get_parse_name</primary></indexterm><programlisting><link linkend="char">char</link> *              g_file_get_parse_name               (<link linkend="GFile">GFile</link> *file);</programlisting>
<para>
Gets the parse name of the <parameter>file</parameter>.
A parse name is a UTF-8 string that describes the
file such that one can get the <link linkend="GFile"><type>GFile</type></link> back using
<link linkend="g-file-parse-name"><function>g_file_parse_name()</function></link>.
</para>
<para>
This is generally used to show the <link linkend="GFile"><type>GFile</type></link> as a nice
full-pathname kind of string in a user interface,
like in a location entry.
</para>
<para>
For local files with names that can safely be converted
to UTF8 the pathname is used, otherwise the IRI is used
(a form of URI that allows UTF8 characters unescaped).
</para>
<para>
This call does no blocking i/o.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a string containing the <link linkend="GFile"><type>GFile</type></link>'s parse name. The returned 
    string should be freed with <link linkend="g-free"><function>g_free()</function></link> when no longer needed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-get-parent" role="function">
<title>g_file_get_parent ()</title>
<indexterm zone="g-file-get-parent"><primary sortas="file_get_parent">g_file_get_parent</primary></indexterm><programlisting><link linkend="GFile">GFile</link> *             g_file_get_parent                   (<link linkend="GFile">GFile</link> *file);</programlisting>
<para>
Gets the parent directory for the <parameter>file</parameter>. 
If the <parameter>file</parameter> represents the root directory of the 
file system, then <link linkend="NULL--CAPS"><literal>NULL</literal></link> will be returned.
</para>
<para>
This call does no blocking i/o.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFile"><type>GFile</type></link> structure to the parent of the given
    <link linkend="GFile"><type>GFile</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if there is no parent. 
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-get-child" role="function">
<title>g_file_get_child ()</title>
<indexterm zone="g-file-get-child"><primary sortas="file_get_child">g_file_get_child</primary></indexterm><programlisting><link linkend="GFile">GFile</link> *             g_file_get_child                    (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *name);</programlisting>
<para>
Gets a child of <parameter>file</parameter> with basename equal to <parameter>name</parameter>.
</para>
<para>
Note that the file with that specific name might not exist, but
you can still have a <link linkend="GFile"><type>GFile</type></link> that points to it. You can use this
for instance to create that file.
</para>
<para>
This call does no blocking i/o.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara> string containing the child's basename.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFile"><type>GFile</type></link> to a child specified by <parameter>name</parameter>.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-get-child-for-display-name" role="function">
<title>g_file_get_child_for_display_name ()</title>
<indexterm zone="g-file-get-child-for-display-name"><primary sortas="file_get_child_for_display_name">g_file_get_child_for_display_name</primary></indexterm><programlisting><link linkend="GFile">GFile</link> *             g_file_get_child_for_display_name   (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *display_name,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Gets the child of <parameter>file</parameter> for a given <parameter>display_name</parameter> (i.e. a UTF8
version of the name). If this function fails, it returns <link linkend="NULL--CAPS"><literal>NULL</literal></link> and <parameter>error</parameter> will be 
set. This is very useful when constructing a GFile for a new file
and the user entered the filename in the user interface, for instance
when you select a directory and type a filename in the file selector.
</para>
<para>
This call does no blocking i/o.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>display_name</parameter>&#160;:</term>
<listitem><simpara> string to a possible child.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> <link linkend="GError"><type>GError</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFile"><type>GFile</type></link> to the specified child, or 
    <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the display name couldn't be converted.  
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-has-prefix" role="function">
<title>g_file_has_prefix ()</title>
<indexterm zone="g-file-has-prefix"><primary sortas="file_has_prefix">g_file_has_prefix</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_has_prefix                   (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFile">GFile</link> *prefix);</programlisting>
<para>
Checks whether <parameter>file</parameter> has the prefix specified by <parameter>prefix</parameter>. In other word, 
if the names of inital elements of <parameter>file</parameter><!-- -->s pathname match <parameter>prefix</parameter>.
Only full pathname elements are matched, so a path like /foo is not
considered a prefix of /foobar, only of /foo/bar.
</para>
<para>
This call does no i/o, as it works purely on names. As such it can 
sometimes return <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> even if <parameter>file</parameter> is inside a <parameter>prefix</parameter> (from a 
filesystem point of view), because the prefix of <parameter>file</parameter> is an alias 
of <parameter>prefix</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>prefix</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>  <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <parameter>files</parameter>'s parent, grandparent, etc is <parameter>prefix</parameter>. 
    <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-get-relative-path" role="function">
<title>g_file_get_relative_path ()</title>
<indexterm zone="g-file-get-relative-path"><primary sortas="file_get_relative_path">g_file_get_relative_path</primary></indexterm><programlisting><link linkend="char">char</link> *              g_file_get_relative_path            (<link linkend="GFile">GFile</link> *parent,
                                                         <link linkend="GFile">GFile</link> *descendant);</programlisting>
<para>
Gets the path for <parameter>descendant</parameter> relative to <parameter>parent</parameter>. 
</para>
<para>
This call does no blocking i/o.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>parent</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>descendant</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> string with the relative path from <parameter>descendant</parameter> 
    to <parameter>parent</parameter>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if <parameter>descendant</parameter> doesn't have <parameter>parent</parameter> as prefix. 
    The returned string should be freed with <link linkend="g-free"><function>g_free()</function></link> when no longer needed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-resolve-relative-path" role="function">
<title>g_file_resolve_relative_path ()</title>
<indexterm zone="g-file-resolve-relative-path"><primary sortas="file_resolve_relative_path">g_file_resolve_relative_path</primary></indexterm><programlisting><link linkend="GFile">GFile</link> *             g_file_resolve_relative_path        (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *relative_path);</programlisting>
<para>
Resolves a relative path for <parameter>file</parameter> to an absolute path.
</para>
<para>
This call does no blocking i/o.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>relative_path</parameter>&#160;:</term>
<listitem><simpara> a given relative path string.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="GFile"><type>GFile</type></link> to the resolved path. <link linkend="NULL--CAPS"><literal>NULL</literal></link> if <parameter>relative_path</parameter> 
    is <link linkend="NULL--CAPS"><literal>NULL</literal></link> or if <parameter>file</parameter> is invalid.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-is-native" role="function">
<title>g_file_is_native ()</title>
<indexterm zone="g-file-is-native"><primary sortas="file_is_native">g_file_is_native</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_is_native                    (<link linkend="GFile">GFile</link> *file);</programlisting>
<para>
Checks to see if a file is native to the platform.
</para>
<para>
A native file s one expressed in the platform-native filename format,
e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local,
as it might be on a locally mounted remote filesystem.
</para>
<para>
On some systems non-native files may be available using
the native filesystem via a userspace filesystem (FUSE), in
these cases this call will return <link linkend="FALSE--CAPS"><literal>FALSE</literal></link>, but <link linkend="g-file-get-path"><function>g_file_get_path()</function></link>
will still return a native path.
</para>
<para>
This call does no blocking i/o.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if file is native. 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-has-uri-scheme" role="function">
<title>g_file_has_uri_scheme ()</title>
<indexterm zone="g-file-has-uri-scheme"><primary sortas="file_has_uri_scheme">g_file_has_uri_scheme</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_has_uri_scheme               (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *uri_scheme);</programlisting>
<para>
Checks to see if a <link linkend="GFile"><type>GFile</type></link> has a given URI scheme.
</para>
<para>
This call does no blocking i/o.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uri_scheme</parameter>&#160;:</term>
<listitem><simpara> a string containing a URI scheme.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if <link linkend="GFile"><type>GFile</type></link>'s backend supports the
    given URI scheme, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> if URI scheme is <link linkend="NULL--CAPS"><literal>NULL</literal></link>,
    not supported, or <link linkend="GFile"><type>GFile</type></link> is invalid.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-get-uri-scheme" role="function">
<title>g_file_get_uri_scheme ()</title>
<indexterm zone="g-file-get-uri-scheme"><primary sortas="file_get_uri_scheme">g_file_get_uri_scheme</primary></indexterm><programlisting><link linkend="char">char</link> *              g_file_get_uri_scheme               (<link linkend="GFile">GFile</link> *file);</programlisting>
<para>
Gets the URI scheme for a <link linkend="GFile"><type>GFile</type></link>.
RFC 3986 decodes the scheme as:
<programlisting>
URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] 
</programlisting>
Common schemes include "file", "http", "ftp", etc. 
</para>
<para>
This call does no blocking i/o.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a string containing the URI scheme for the given 
    <link linkend="GFile"><type>GFile</type></link>. The returned string should be freed with <link linkend="g-free"><function>g_free()</function></link> 
    when no longer needed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-read" role="function">
<title>g_file_read ()</title>
<indexterm zone="g-file-read"><primary sortas="file_read">g_file_read</primary></indexterm><programlisting><link linkend="GFileInputStream">GFileInputStream</link> *  g_file_read                         (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Opens a file for reading. The result is a <link linkend="GFileInputStream"><type>GFileInputStream</type></link> that
can be used to read the contents of the file.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned. 
</para>
<para>
If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
Other errors are possible too, and depend on what kind of filesystem the file is on.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> <link linkend="GFile"><type>GFile</type></link> to read.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GCancellable"><type>GCancellable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="GFileInputStream"><type>GFileInputStream</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-read-async" role="function">
<title>g_file_read_async ()</title>
<indexterm zone="g-file-read-async"><primary sortas="file_read_async">g_file_read_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_read_async                   (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Asynchronously opens <parameter>file</parameter> for reading.
</para>
<para>
For more details, see <link linkend="g-file-read"><function>g_file_read()</function></link> which is
the synchronous version of this call.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-read-finish"><function>g_file_read_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>io_priority</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="io-priority">I/O priority</link>
    of the request.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-read-finish" role="function">
<title>g_file_read_finish ()</title>
<indexterm zone="g-file-read-finish"><primary sortas="file_read_finish">g_file_read_finish</primary></indexterm><programlisting><link linkend="GFileInputStream">GFileInputStream</link> *  g_file_read_finish                  (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an asynchronous file read operation started with 
<link linkend="g-file-read-async"><function>g_file_read_async()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileInputStream"><type>GFileInputStream</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-append-to" role="function">
<title>g_file_append_to ()</title>
<indexterm zone="g-file-append-to"><primary sortas="file_append_to">g_file_append_to</primary></indexterm><programlisting><link linkend="GFileOutputStream">GFileOutputStream</link> * g_file_append_to                    (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Gets an output stream for appending data to the file. If
the file doesn't already exist it is created.
</para>
<para>
By default files created are generally readable by everyone,
but if you pass <link linkend="G-FILE-CREATE-PRIVATE--CAPS"><type>G_FILE_CREATE_PRIVATE</type></link> in <parameter>flags</parameter> the file
will be made readable only to the current user, to the level that
is supported on the target filesystem.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned. 
</para>
<para>
Some file systems don't allow all file names, and may
return an <link linkend="G-IO-ERROR-INVALID-FILENAME--CAPS"><literal>G_IO_ERROR_INVALID_FILENAME</literal></link> error.
If the file is a directory the <link linkend="G-IO-ERROR-IS-DIRECTORY--CAPS"><literal>G_IO_ERROR_IS_DIRECTORY</literal></link> error will be
returned. Other errors are possible too, and depend on what kind of
filesystem the file is on.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileCreateFlags"><type>GFileCreateFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileOutputStream"><type>GFileOutputStream</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-create" role="function">
<title>g_file_create ()</title>
<indexterm zone="g-file-create"><primary sortas="file_create">g_file_create</primary></indexterm><programlisting><link linkend="GFileOutputStream">GFileOutputStream</link> * g_file_create                       (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Creates a new file and returns an output stream for writing to it.
The file must not already exist.
</para>
<para>
By default files created are generally readable by everyone,
but if you pass <link linkend="G-FILE-CREATE-PRIVATE--CAPS"><type>G_FILE_CREATE_PRIVATE</type></link> in <parameter>flags</parameter> the file
will be made readable only to the current user, to the level that
is supported on the target filesystem.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned. 
</para>
<para>
If a file or directory with this name already exists the G_IO_ERROR_EXISTS
error will be returned.
Some file systems don't allow all file names, and may
return an G_IO_ERROR_INVALID_FILENAME error, and if the name
is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
Other errors are possible too, and depend on what kind of
filesystem the file is on.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileCreateFlags"><type>GFileCreateFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileOutputStream"><type>GFileOutputStream</type></link> for the newly created file, or 
    <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-replace" role="function">
<title>g_file_replace ()</title>
<indexterm zone="g-file-replace"><primary sortas="file_replace">g_file_replace</primary></indexterm><programlisting><link linkend="GFileOutputStream">GFileOutputStream</link> * g_file_replace                      (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *etag,
                                                         <link linkend="gboolean">gboolean</link> make_backup,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Returns an output stream for overwriting the file, possibly
creating a backup copy of the file first. If the file doesn't exist,
it will be created.
</para>
<para>
This will try to replace the file in the safest way possible so
that any errors during the writing will not affect an already
existing copy of the file. For instance, for local files it
may write to a temporary file and then atomically rename over
the destination when the stream is closed.
</para>
<para>
By default files created are generally readable by everyone,
but if you pass <link linkend="G-FILE-CREATE-PRIVATE--CAPS"><type>G_FILE_CREATE_PRIVATE</type></link> in <parameter>flags</parameter> the file
will be made readable only to the current user, to the level that
is supported on the target filesystem.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned. 
</para>
<para>
If you pass in a non-<link linkend="NULL--CAPS"><type>NULL</type></link> <parameter>etag</parameter> value, then this value is
compared to the current entity tag of the file, and if they differ
an G_IO_ERROR_WRONG_ETAG error is returned. This generally means
that the file has been changed since you last read it. You can get
the new etag from <link linkend="g-file-output-stream-get-etag"><function>g_file_output_stream_get_etag()</function></link> after you've
finished writing and closed the <link linkend="GFileOutputStream"><type>GFileOutputStream</type></link>. When you load
a new file you can use <link linkend="g-file-input-stream-query-info"><function>g_file_input_stream_query_info()</function></link> to get
the etag of the file.
</para>
<para>
If <parameter>make_backup</parameter> is <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, this function will attempt to make a backup
of the current file before overwriting it. If this fails a G_IO_ERROR_CANT_CREATE_BACKUP
error will be returned. If you want to replace anyway, try again with
<parameter>make_backup</parameter> set to <link linkend="FALSE--CAPS"><literal>FALSE</literal></link>.
</para>
<para>
If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will be returned,
and if the file is some other form of non-regular file then a
G_IO_ERROR_NOT_REGULAR_FILE error will be returned.
Some file systems don't allow all file names, and may
return an G_IO_ERROR_INVALID_FILENAME error, and if the name
is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
Other errors are possible too, and depend on what kind of
filesystem the file is on.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>etag</parameter>&#160;:</term>
<listitem><simpara> an optional <link linkend="gfile-etag">entity tag</link> for the 
    current <link linkend="GFile"><type>GFile</type></link>, or <link linkend="NULL--CAPS"><type>NULL</type></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>make_backup</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if a backup should be created.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileCreateFlags"><type>GFileCreateFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileOutputStream"><type>GFileOutputStream</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error. 
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-append-to-async" role="function">
<title>g_file_append_to_async ()</title>
<indexterm zone="g-file-append-to-async"><primary sortas="file_append_to_async">g_file_append_to_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_append_to_async              (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Asynchronously opens <parameter>file</parameter> for appending.
</para>
<para>
For more details, see <link linkend="g-file-append-to"><function>g_file_append_to()</function></link> which is
the synchronous version of this call.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-append-to-finish"><function>g_file_append_to_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileCreateFlags"><type>GFileCreateFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>io_priority</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="io-priority">I/O priority</link> 
    of the request. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-append-to-finish" role="function">
<title>g_file_append_to_finish ()</title>
<indexterm zone="g-file-append-to-finish"><primary sortas="file_append_to_finish">g_file_append_to_finish</primary></indexterm><programlisting><link linkend="GFileOutputStream">GFileOutputStream</link> * g_file_append_to_finish             (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an asynchronous file append operation started with 
<link linkend="g-file-append-to-async"><function>g_file_append_to_async()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> <link linkend="GAsyncResult"><type>GAsyncResult</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a valid <link linkend="GFileOutputStream"><type>GFileOutputStream</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-create-async" role="function">
<title>g_file_create_async ()</title>
<indexterm zone="g-file-create-async"><primary sortas="file_create_async">g_file_create_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_create_async                 (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Asynchronously creates a new file and returns an output stream for writing to it.
The file must not already exist.
</para>
<para>
For more details, see <link linkend="g-file-create"><function>g_file_create()</function></link> which is
the synchronous version of this call.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-create-finish"><function>g_file_create_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileCreateFlags"><type>GFileCreateFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>io_priority</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="io-priority">I/O priority</link> 
    of the request.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-create-finish" role="function">
<title>g_file_create_finish ()</title>
<indexterm zone="g-file-create-finish"><primary sortas="file_create_finish">g_file_create_finish</primary></indexterm><programlisting><link linkend="GFileOutputStream">GFileOutputStream</link> * g_file_create_finish                (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an asynchronous file create operation started with 
<link linkend="g-file-create-async"><function>g_file_create_async()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileOutputStream"><type>GFileOutputStream</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-replace-async" role="function">
<title>g_file_replace_async ()</title>
<indexterm zone="g-file-replace-async"><primary sortas="file_replace_async">g_file_replace_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_replace_async                (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *etag,
                                                         <link linkend="gboolean">gboolean</link> make_backup,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Asynchronously overwrites the file, replacing the contents, possibly
creating a backup copy of the file first.
</para>
<para>
For more details, see <link linkend="g-file-replace"><function>g_file_replace()</function></link> which is
the synchronous version of this call.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-replace-finish"><function>g_file_replace_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>etag</parameter>&#160;:</term>
<listitem><simpara> an <link linkend="gfile-etag">entity tag</link> for the 
    current <link linkend="GFile"><type>GFile</type></link>, or NULL to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>make_backup</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if a backup should be created.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileCreateFlags"><type>GFileCreateFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>io_priority</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="io-priority">I/O priority</link> 
    of the request.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-replace-finish" role="function">
<title>g_file_replace_finish ()</title>
<indexterm zone="g-file-replace-finish"><primary sortas="file_replace_finish">g_file_replace_finish</primary></indexterm><programlisting><link linkend="GFileOutputStream">GFileOutputStream</link> * g_file_replace_finish               (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an asynchronous file replace operation started with 
<link linkend="g-file-replace-async"><function>g_file_replace_async()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileOutputStream"><type>GFileOutputStream</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-query-info" role="function">
<title>g_file_query_info ()</title>
<indexterm zone="g-file-query-info"><primary sortas="file_query_info">g_file_query_info</primary></indexterm><programlisting><link linkend="GFileInfo">GFileInfo</link> *         g_file_query_info                   (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attributes,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Gets the requested information about specified <parameter>file</parameter>. The result
is a <link linkend="GFileInfo"><type>GFileInfo</type></link> object that contains key-value attributes (such as 
the type or size of the file).
</para>
<para>
The <parameter>attribute</parameter> value is a string that specifies the file attributes that
should be gathered. It is not an error if it's not possible to read a particular
requested attribute from a file - it just won't be set. <parameter>attribute</parameter> should
be a comma-separated list of attribute or attribute wildcards. The wildcard "*"
means all attributes, and a wildcard like "standard::*" means all attributes in the standard
namespace. An example attribute query be "standard::*,owner::user".
The standard attributes are available as defines, like <link linkend="G-FILE-ATTRIBUTE-STANDARD-NAME--CAPS"><type>G_FILE_ATTRIBUTE_STANDARD_NAME</type></link>.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned. 
</para>
<para>
For symlinks, normally the information about the target of the
symlink is returned, rather than information about the symlink itself.
However if you pass <link linkend="G-FILE-QUERY-INFO-NOFOLLOW-SYMLINKS--CAPS"><type>G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS</type></link> in <parameter>flags</parameter> the
information about the symlink itself will be returned. Also, for symlinks
that point to non-existing files the information about the symlink itself
will be returned.
</para>
<para>
If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
Other errors are possible too, and depend on what kind of filesystem the file is on.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attributes</parameter>&#160;:</term>
<listitem><simpara> an attribute query string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileQueryInfoFlags"><type>GFileQueryInfoFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileInfo"><type>GFileInfo</type></link> for the given <parameter>file</parameter>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-query-info-async" role="function">
<title>g_file_query_info_async ()</title>
<indexterm zone="g-file-query-info-async"><primary sortas="file_query_info_async">g_file_query_info_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_query_info_async             (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attributes,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Asynchronously gets the requested information about specified <parameter>file</parameter>. The result
is a <link linkend="GFileInfo"><type>GFileInfo</type></link> object that contains key-value attributes (such as type or size
for the file).
</para>
<para>
For more details, see <link linkend="g-file-query-info"><function>g_file_query_info()</function></link> which is
the synchronous version of this call.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-query-info-finish"><function>g_file_query_info_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attributes</parameter>&#160;:</term>
<listitem><simpara> an attribute query string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileQueryInfoFlags"><type>GFileQueryInfoFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>io_priority</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="io-priority">I/O priority</link> 
    of the request.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-query-info-finish" role="function">
<title>g_file_query_info_finish ()</title>
<indexterm zone="g-file-query-info-finish"><primary sortas="file_query_info_finish">g_file_query_info_finish</primary></indexterm><programlisting><link linkend="GFileInfo">GFileInfo</link> *         g_file_query_info_finish            (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an asynchronous file info query. 
See <link linkend="g-file-query-info-async"><function>g_file_query_info_async()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="GFileInfo"><type>GFileInfo</type></link> for given <parameter>file</parameter> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-query-exists" role="function">
<title>g_file_query_exists ()</title>
<indexterm zone="g-file-query-exists"><primary sortas="file_query_exists">g_file_query_exists</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_query_exists                 (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable);</programlisting>
<para>
Utility function to check if a particular file exists. This is
implemented using <link linkend="g-file-query-info"><function>g_file_query_info()</function></link> and as such does blocking I/O.
</para>
<para>
Note that in many cases it is racy to first check for file existence
and then execute something based on the outcome of that, because the
file might have been created or removed in between the operations. The
general approach to handling that is to not check, but just do the
operation and handle the errors as they come.
</para>
<para>
As an example of race-free checking, take the case of reading a file, and
if it doesn't exist, creating it. There are two racy versions: read it, and
on error create it; and: check if it exists, if not create it. These
can both result in two processes creating the file (with perhaps a partially
written file as the result). The correct approach is to always try to create
the file with <link linkend="g-file-create"><function>g_file_create()</function></link> which will either atomically create the file
or fail with a G_IO_ERROR_EXISTS error.
</para>
<para>
However, in many cases an existence check is useful in a user
interface, for instance to make a menu item sensitive/insensitive, so that
you don't have to fool users that something is possible and then just show
and error dialog. If you do this, you should make sure to also handle the
errors that can happen due to races when you execute the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the file exists (and can be detected without error), <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise (or if cancelled).
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-query-file-type" role="function" condition="since:2.18">
<title>g_file_query_file_type ()</title>
<indexterm zone="g-file-query-file-type" role="2.18"><primary sortas="file_query_file_type">g_file_query_file_type</primary></indexterm><programlisting><link linkend="GFileType">GFileType</link>           g_file_query_file_type              (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable);</programlisting>
<para>
Utility function to inspect the <link linkend="GFileType"><type>GFileType</type></link> of a file. This is
implemented using <link linkend="g-file-query-info"><function>g_file_query_info()</function></link> and as such does blocking I/O.
</para>
<para>
The primary use case of this method is to check if a file is a regular file,
directory, or symlink.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileQueryInfoFlags"><type>GFileQueryInfoFlags</type></link> passed to <link linkend="g-file-query-info"><function>g_file_query_info()</function></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The <link linkend="GFileType"><type>GFileType</type></link> of the file and <link linkend="G-FILE-TYPE-UNKNOWN--CAPS"><type>G_FILE_TYPE_UNKNOWN</type></link> if the file
         does not exist

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.18</para></refsect2>
<refsect2 id="g-file-query-filesystem-info" role="function">
<title>g_file_query_filesystem_info ()</title>
<indexterm zone="g-file-query-filesystem-info"><primary sortas="file_query_filesystem_info">g_file_query_filesystem_info</primary></indexterm><programlisting><link linkend="GFileInfo">GFileInfo</link> *         g_file_query_filesystem_info        (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attributes,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Similar to <link linkend="g-file-query-info"><function>g_file_query_info()</function></link>, but obtains information
about the filesystem the <parameter>file</parameter> is on, rather than the file itself.
For instance the amount of space available and the type of
the filesystem.
</para>
<para>
The <parameter>attribute</parameter> value is a string that specifies the file attributes that
should be gathered. It is not an error if it's not possible to read a particular
requested attribute from a file - it just won't be set. <parameter>attribute</parameter> should
be a comma-separated list of attribute or attribute wildcards. The wildcard "*"
means all attributes, and a wildcard like "fs:*" means all attributes in the fs
namespace. The standard namespace for filesystem attributes is "fs".
Common attributes of interest are <link linkend="G-FILE-ATTRIBUTE-FILESYSTEM-SIZE--CAPS"><type>G_FILE_ATTRIBUTE_FILESYSTEM_SIZE</type></link>
(the total size of the filesystem in bytes), <link linkend="G-FILE-ATTRIBUTE-FILESYSTEM-FREE--CAPS"><type>G_FILE_ATTRIBUTE_FILESYSTEM_FREE</type></link> (number of
bytes available), and <link linkend="G-FILE-ATTRIBUTE-FILESYSTEM-TYPE--CAPS"><type>G_FILE_ATTRIBUTE_FILESYSTEM_TYPE</type></link> (type of the filesystem).
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned. 
</para>
<para>
If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
Other errors are possible too, and depend on what kind of filesystem the file is on.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attributes</parameter>&#160;:</term>
<listitem><simpara>  an attribute query string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileInfo"><type>GFileInfo</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if there was an error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-query-filesystem-info-async" role="function">
<title>g_file_query_filesystem_info_async ()</title>
<indexterm zone="g-file-query-filesystem-info-async"><primary sortas="file_query_filesystem_info_async">g_file_query_filesystem_info_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_query_filesystem_info_async  (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attributes,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Asynchronously gets the requested information about the filesystem
that the specified <parameter>file</parameter> is on. The result is a <link linkend="GFileInfo"><type>GFileInfo</type></link> object
that contains key-value attributes (such as type or size for the
file).
</para>
<para>
For more details, see <link linkend="g-file-query-filesystem-info"><function>g_file_query_filesystem_info()</function></link> which is the
synchronous version of this call.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can
then call <link linkend="g-file-query-info-finish"><function>g_file_query_info_finish()</function></link> to get the result of the
operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attributes</parameter>&#160;:</term>
<listitem><simpara> an attribute query string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>io_priority</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="io-priority">I/O priority</link> 
    of the request.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-query-filesystem-info-finish" role="function">
<title>g_file_query_filesystem_info_finish ()</title>
<indexterm zone="g-file-query-filesystem-info-finish"><primary sortas="file_query_filesystem_info_finish">g_file_query_filesystem_info_finish</primary></indexterm><programlisting><link linkend="GFileInfo">GFileInfo</link> *         g_file_query_filesystem_info_finish (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an asynchronous filesystem info query.  See
<link linkend="g-file-query-filesystem-info-async"><function>g_file_query_filesystem_info_async()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="GFileInfo"><type>GFileInfo</type></link> for given <parameter>file</parameter> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-query-default-handler" role="function">
<title>g_file_query_default_handler ()</title>
<indexterm zone="g-file-query-default-handler"><primary sortas="file_query_default_handler">g_file_query_default_handler</primary></indexterm><programlisting><link linkend="GAppInfo">GAppInfo</link> *          g_file_query_default_handler        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Returns the <link linkend="GAppInfo"><type>GAppInfo</type></link> that is registered as the default
application to handle the file specified by <parameter>file</parameter>.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFile"><type>GFile</type></link> to open.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GAppInfo"><type>GAppInfo</type></link> if the handle was found, <link linkend="NULL--CAPS"><literal>NULL</literal></link> if there were errors.
When you are done with it, release it with <link linkend="g-object-unref"><function>g_object_unref()</function></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-find-enclosing-mount" role="function">
<title>g_file_find_enclosing_mount ()</title>
<indexterm zone="g-file-find-enclosing-mount"><primary sortas="file_find_enclosing_mount">g_file_find_enclosing_mount</primary></indexterm><programlisting><link linkend="GMount">GMount</link> *            g_file_find_enclosing_mount         (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Gets a <link linkend="GMount"><type>GMount</type></link> for the <link linkend="GFile"><type>GFile</type></link>. 
</para>
<para>
If the <link linkend="GFileIface"><type>GFileIface</type></link> for <parameter>file</parameter> does not have a mount (e.g. possibly a 
remote share), <parameter>error</parameter> will be set to <link linkend="G-IO-ERROR-NOT-FOUND--CAPS"><literal>G_IO_ERROR_NOT_FOUND</literal></link> and <link linkend="NULL--CAPS"><literal>NULL</literal></link>
will be returned.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GMount"><type>GMount</type></link> where the <parameter>file</parameter> is located or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-find-enclosing-mount-async" role="function">
<title>g_file_find_enclosing_mount_async ()</title>
<indexterm zone="g-file-find-enclosing-mount-async"><primary sortas="file_find_enclosing_mount_async">g_file_find_enclosing_mount_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_find_enclosing_mount_async   (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Asynchronously gets the mount for the file.
</para>
<para>
For more details, see <link linkend="g-file-find-enclosing-mount"><function>g_file_find_enclosing_mount()</function></link> which is
the synchronous version of this call.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-find-enclosing-mount-finish"><function>g_file_find_enclosing_mount_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFile"><type>GFile</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>io_priority</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="io-priority">I/O priority</link> 
    of the request.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-find-enclosing-mount-finish" role="function">
<title>g_file_find_enclosing_mount_finish ()</title>
<indexterm zone="g-file-find-enclosing-mount-finish"><primary sortas="file_find_enclosing_mount_finish">g_file_find_enclosing_mount_finish</primary></indexterm><programlisting><link linkend="GMount">GMount</link> *            g_file_find_enclosing_mount_finish  (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an asynchronous find mount request. 
See <link linkend="g-file-find-enclosing-mount-async"><function>g_file_find_enclosing_mount_async()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFile"><type>GFile</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="GMount"><type>GMount</type></link> for given <parameter>file</parameter> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-enumerate-children" role="function">
<title>g_file_enumerate_children ()</title>
<indexterm zone="g-file-enumerate-children"><primary sortas="file_enumerate_children">g_file_enumerate_children</primary></indexterm><programlisting><link linkend="GFileEnumerator">GFileEnumerator</link> *   g_file_enumerate_children           (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attributes,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Gets the requested information about the files in a directory. The result
is a <link linkend="GFileEnumerator"><type>GFileEnumerator</type></link> object that will give out <link linkend="GFileInfo"><type>GFileInfo</type></link> objects for
all the files in the directory.
</para>
<para>
The <parameter>attribute</parameter> value is a string that specifies the file attributes that
should be gathered. It is not an error if it's not possible to read a particular
requested attribute from a file - it just won't be set. <parameter>attribute</parameter> should
be a comma-separated list of attribute or attribute wildcards. The wildcard "*"
means all attributes, and a wildcard like "standard::*" means all attributes in the standard
namespace. An example attribute query be "standard::*,owner::user".
The standard attributes are available as defines, like <link linkend="G-FILE-ATTRIBUTE-STANDARD-NAME--CAPS"><type>G_FILE_ATTRIBUTE_STANDARD_NAME</type></link>.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned. 
</para>
<para>
If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
If the file is not a directory, the G_FILE_ERROR_NOTDIR error will be returned.
Other errors are possible too.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attributes</parameter>&#160;:</term>
<listitem><simpara> an attribute query string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileQueryInfoFlags"><type>GFileQueryInfoFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> <link linkend="GError"><type>GError</type></link> for error reporting.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A <link linkend="GFileEnumerator"><type>GFileEnumerator</type></link> if successful, <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error. 
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-enumerate-children-async" role="function">
<title>g_file_enumerate_children_async ()</title>
<indexterm zone="g-file-enumerate-children-async"><primary sortas="file_enumerate_children_async">g_file_enumerate_children_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_enumerate_children_async     (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attributes,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Asynchronously gets the requested information about the files in a directory. The result
is a <link linkend="GFileEnumerator"><type>GFileEnumerator</type></link> object that will give out <link linkend="GFileInfo"><type>GFileInfo</type></link> objects for
all the files in the directory.
</para>
<para>
For more details, see <link linkend="g-file-enumerate-children"><function>g_file_enumerate_children()</function></link> which is
the synchronous version of this call.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-enumerate-children-finish"><function>g_file_enumerate_children_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attributes</parameter>&#160;:</term>
<listitem><simpara> an attribute query string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileQueryInfoFlags"><type>GFileQueryInfoFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>io_priority</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="io-priority">I/O priority</link> 
    of the request.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-enumerate-children-finish" role="function">
<title>g_file_enumerate_children_finish ()</title>
<indexterm zone="g-file-enumerate-children-finish"><primary sortas="file_enumerate_children_finish">g_file_enumerate_children_finish</primary></indexterm><programlisting><link linkend="GFileEnumerator">GFileEnumerator</link> *   g_file_enumerate_children_finish    (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an async enumerate children operation.
See <link linkend="g-file-enumerate-children-async"><function>g_file_enumerate_children_async()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileEnumerator"><type>GFileEnumerator</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if an error occurred.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-set-display-name" role="function">
<title>g_file_set_display_name ()</title>
<indexterm zone="g-file-set-display-name"><primary sortas="file_set_display_name">g_file_set_display_name</primary></indexterm><programlisting><link linkend="GFile">GFile</link> *             g_file_set_display_name             (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *display_name,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Renames <parameter>file</parameter> to the specified display name.
</para>
<para>
The display name is converted from UTF8 to the correct encoding for the target
filesystem if possible and the <parameter>file</parameter> is renamed to this.
</para>
<para>
If you want to implement a rename operation in the user interface the edit name
(<link linkend="G-FILE-ATTRIBUTE-STANDARD-EDIT-NAME--CAPS"><type>G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME</type></link>) should be used as the initial value in the rename
widget, and then the result after editing should be passed to <link linkend="g-file-set-display-name"><function>g_file_set_display_name()</function></link>.
</para>
<para>
On success the resulting converted filename is returned.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>display_name</parameter>&#160;:</term>
<listitem><simpara> a string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFile"><type>GFile</type></link> specifying what <parameter>file</parameter> was renamed to, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> 
    if there was an error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-set-display-name-async" role="function">
<title>g_file_set_display_name_async ()</title>
<indexterm zone="g-file-set-display-name-async"><primary sortas="file_set_display_name_async">g_file_set_display_name_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_set_display_name_async       (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *display_name,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Asynchronously sets the display name for a given <link linkend="GFile"><type>GFile</type></link>.
</para>
<para>
For more details, see <link linkend="g-file-set-display-name"><function>g_file_set_display_name()</function></link> which is
the synchronous version of this call.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-set-display-name-finish"><function>g_file_set_display_name_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>display_name</parameter>&#160;:</term>
<listitem><simpara> a string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>io_priority</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="io-priority">I/O priority</link> 
    of the request. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-set-display-name-finish" role="function">
<title>g_file_set_display_name_finish ()</title>
<indexterm zone="g-file-set-display-name-finish"><primary sortas="file_set_display_name_finish">g_file_set_display_name_finish</primary></indexterm><programlisting><link linkend="GFile">GFile</link> *             g_file_set_display_name_finish      (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes setting a display name started with 
<link linkend="g-file-set-display-name-async"><function>g_file_set_display_name_async()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFile"><type>GFile</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-delete" role="function">
<title>g_file_delete ()</title>
<indexterm zone="g-file-delete"><primary sortas="file_delete">g_file_delete</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_delete                       (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Deletes a file. If the <parameter>file</parameter> is a directory, it will only be deleted if it 
is empty.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the file was deleted. <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-trash" role="function">
<title>g_file_trash ()</title>
<indexterm zone="g-file-trash"><primary sortas="file_trash">g_file_trash</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_trash                        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Sends <parameter>file</parameter> to the "Trashcan", if possible. This is similar to
deleting it, but the user can recover it before emptying the trashcan.
Not all file systems support trashing, so this call can return the
<link linkend="G-IO-ERROR-NOT-SUPPORTED--CAPS"><literal>G_IO_ERROR_NOT_SUPPORTED</literal></link> error.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> <link linkend="GFile"><type>GFile</type></link> to send to trash.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> on successful trash, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-copy" role="function">
<title>g_file_copy ()</title>
<indexterm zone="g-file-copy"><primary sortas="file_copy">g_file_copy</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_copy                         (<link linkend="GFile">GFile</link> *source,
                                                         <link linkend="GFile">GFile</link> *destination,
                                                         <link linkend="GFileCopyFlags">GFileCopyFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GFileProgressCallback">GFileProgressCallback</link> progress_callback,
                                                         <link linkend="gpointer">gpointer</link> progress_callback_data,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Copies the file <parameter>source</parameter> to the location specified by <parameter>destination</parameter>.
Can not handle recursive copies of directories.
</para>
<para>
If the flag <link linkend="G-FILE-COPY-OVERWRITE--CAPS"><type>G_FILE_COPY_OVERWRITE</type></link> is specified an already
existing <parameter>destination</parameter> file is overwritten.
</para>
<para>
If the flag <link linkend="G-FILE-COPY-NOFOLLOW-SYMLINKS--CAPS"><type>G_FILE_COPY_NOFOLLOW_SYMLINKS</type></link> is specified then symlinks
will be copied as symlinks, otherwise the target of the
<parameter>source</parameter> symlink will be copied.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned. 
</para>
<para>
If <parameter>progress_callback</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be monitored by
setting this to a <link linkend="GFileProgressCallback"><type>GFileProgressCallback</type></link> function. <parameter>progress_callback_data</parameter>
will be passed to this function. It is guaranteed that this callback will
be called after all data has been transferred with the total number of bytes
copied during the operation.
</para>
<para>
If the <parameter>source</parameter> file does not exist then the G_IO_ERROR_NOT_FOUND
error is returned, independent on the status of the <parameter>destination</parameter>.
</para>
<para>
If <link linkend="G-FILE-COPY-OVERWRITE--CAPS"><type>G_FILE_COPY_OVERWRITE</type></link> is not specified and the target exists, then the
error G_IO_ERROR_EXISTS is returned.
</para>
<para>
If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
error is returned. If trying to overwrite a directory with a directory the
G_IO_ERROR_WOULD_MERGE error is returned.
</para>
<para>
If the source is a directory and the target does not exist, or <link linkend="G-FILE-COPY-OVERWRITE--CAPS"><type>G_FILE_COPY_OVERWRITE</type></link> is
specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
is returned.
</para>
<para>
If you are interested in copying the <link linkend="GFile"><type>GFile</type></link> object itself (not the on-disk
file), see <link linkend="g-file-dup"><function>g_file_dup()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>destination</parameter>&#160;:</term>
<listitem><simpara> destination <link linkend="GFile"><type>GFile</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> set of <link linkend="GFileCopyFlags"><type>GFileCopyFlags</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>progress_callback</parameter>&#160;:</term>
<listitem><simpara> function to callback with progress information
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>progress_callback_data</parameter>&#160;:</term>
<listitem><simpara> user data to pass to <parameter>progress_callback</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> <link linkend="GError"><type>GError</type></link> to set on error, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> on success, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-copy-async" role="function">
<title>g_file_copy_async ()</title>
<indexterm zone="g-file-copy-async"><primary sortas="file_copy_async">g_file_copy_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_copy_async                   (<link linkend="GFile">GFile</link> *source,
                                                         <link linkend="GFile">GFile</link> *destination,
                                                         <link linkend="GFileCopyFlags">GFileCopyFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GFileProgressCallback">GFileProgressCallback</link> progress_callback,
                                                         <link linkend="gpointer">gpointer</link> progress_callback_data,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Copies the file <parameter>source</parameter> to the location specified by <parameter>destination</parameter> 
asynchronously. For details of the behaviour, see <link linkend="g-file-copy"><function>g_file_copy()</function></link>.
</para>
<para>
If <parameter>progress_callback</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then that function that will be called
just like in <link linkend="g-file-copy"><function>g_file_copy()</function></link>, however the callback will run in the main loop,
not in the thread that is doing the I/O operation.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-copy-finish"><function>g_file_copy_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>destination</parameter>&#160;:</term>
<listitem><simpara> destination <link linkend="GFile"><type>GFile</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> set of <link linkend="GFileCopyFlags"><type>GFileCopyFlags</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>io_priority</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="io-priority">I/O priority</link> 
    of the request. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>progress_callback</parameter>&#160;:</term>
<listitem><simpara> function to callback with progress information
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>progress_callback_data</parameter>&#160;:</term>
<listitem><simpara> user data to pass to <parameter>progress_callback</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-copy-finish" role="function">
<title>g_file_copy_finish ()</title>
<indexterm zone="g-file-copy-finish"><primary sortas="file_copy_finish">g_file_copy_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_copy_finish                  (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes copying the file started with 
<link linkend="g-file-copy-async"><function>g_file_copy_async()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> on success, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> on error.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-move" role="function">
<title>g_file_move ()</title>
<indexterm zone="g-file-move"><primary sortas="file_move">g_file_move</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_move                         (<link linkend="GFile">GFile</link> *source,
                                                         <link linkend="GFile">GFile</link> *destination,
                                                         <link linkend="GFileCopyFlags">GFileCopyFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GFileProgressCallback">GFileProgressCallback</link> progress_callback,
                                                         <link linkend="gpointer">gpointer</link> progress_callback_data,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Tries to move the file or directory <parameter>source</parameter> to the location specified by <parameter>destination</parameter>.
If native move operations are supported then this is used, otherwise a copy + delete
fallback is used. The native implementation may support moving directories (for instance
on moves inside the same filesystem), but the fallback code does not.
</para>
<para>
If the flag <link linkend="G-FILE-COPY-OVERWRITE--CAPS"><type>G_FILE_COPY_OVERWRITE</type></link> is specified an already
existing <parameter>destination</parameter> file is overwritten.
</para>
<para>
If the flag <link linkend="G-FILE-COPY-NOFOLLOW-SYMLINKS--CAPS"><type>G_FILE_COPY_NOFOLLOW_SYMLINKS</type></link> is specified then symlinks
will be copied as symlinks, otherwise the target of the
<parameter>source</parameter> symlink will be copied.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned. 
</para>
<para>
If <parameter>progress_callback</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be monitored by
setting this to a <link linkend="GFileProgressCallback"><type>GFileProgressCallback</type></link> function. <parameter>progress_callback_data</parameter>
will be passed to this function. It is guaranteed that this callback will
be called after all data has been transferred with the total number of bytes
copied during the operation.
</para>
<para>
If the <parameter>source</parameter> file does not exist then the G_IO_ERROR_NOT_FOUND
error is returned, independent on the status of the <parameter>destination</parameter>.
</para>
<para>
If <link linkend="G-FILE-COPY-OVERWRITE--CAPS"><type>G_FILE_COPY_OVERWRITE</type></link> is not specified and the target exists, then the
error G_IO_ERROR_EXISTS is returned.
</para>
<para>
If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
error is returned. If trying to overwrite a directory with a directory the
G_IO_ERROR_WOULD_MERGE error is returned.
</para>
<para>
If the source is a directory and the target does not exist, or <link linkend="G-FILE-COPY-OVERWRITE--CAPS"><type>G_FILE_COPY_OVERWRITE</type></link> is
specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
may be returned (if the native move operation isn't available).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> <link linkend="GFile"><type>GFile</type></link> pointing to the source location.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>destination</parameter>&#160;:</term>
<listitem><simpara> <link linkend="GFile"><type>GFile</type></link> pointing to the destination location.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> set of <link linkend="GFileCopyFlags"><type>GFileCopyFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>progress_callback</parameter>&#160;:</term>
<listitem><simpara> <link linkend="GFileProgressCallback"><type>GFileProgressCallback</type></link> function for updates.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>progress_callback_data</parameter>&#160;:</term>
<listitem><simpara> gpointer to user data for the callback function.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> <link linkend="GError"><type>GError</type></link> for returning error conditions, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> on successful move, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-make-directory" role="function">
<title>g_file_make_directory ()</title>
<indexterm zone="g-file-make-directory"><primary sortas="file_make_directory">g_file_make_directory</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_make_directory               (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Creates a directory. Note that this will only create a child directory of
the immediate parent directory of the path or URI given by the <link linkend="GFile"><type>GFile</type></link>. To 
recursively create directories, see <link linkend="g-file-make-directory-with-parents"><function>g_file_make_directory_with_parents()</function></link>.
This function will fail if the parent directory does not exist, setting 
<parameter>error</parameter> to <link linkend="G-IO-ERROR-NOT-FOUND--CAPS"><literal>G_IO_ERROR_NOT_FOUND</literal></link>. If the file system doesn't support creating
directories, this function will fail, setting <parameter>error</parameter> to 
<link linkend="G-IO-ERROR-NOT-SUPPORTED--CAPS"><literal>G_IO_ERROR_NOT_SUPPORTED</literal></link>.
</para>
<para>
For a local <link linkend="GFile"><type>GFile</type></link> the newly created directory will have the default
(current) ownership and permissions of the current process.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> on successful creation, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-make-directory-with-parents" role="function" condition="since:2.18">
<title>g_file_make_directory_with_parents ()</title>
<indexterm zone="g-file-make-directory-with-parents" role="2.18"><primary sortas="file_make_directory_with_parents">g_file_make_directory_with_parents</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_make_directory_with_parents  (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Creates a directory and any parent directories that may not exist similar to
'mkdir -p'. If the file system does not support creating directories, this
function will fail, setting <parameter>error</parameter> to <link linkend="G-IO-ERROR-NOT-SUPPORTED--CAPS"><literal>G_IO_ERROR_NOT_SUPPORTED</literal></link>.
</para>
<para>
For a local <link linkend="GFile"><type>GFile</type></link> the newly created directories will have the default
(current) ownership and permissions of the current process.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if all directories have been successfully created, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link>
otherwise.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.18</para></refsect2>
<refsect2 id="g-file-make-symbolic-link" role="function">
<title>g_file_make_symbolic_link ()</title>
<indexterm zone="g-file-make-symbolic-link"><primary sortas="file_make_symbolic_link">g_file_make_symbolic_link</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_make_symbolic_link           (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *symlink_value,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Creates a symbolic link.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>symlink_value</parameter>&#160;:</term>
<listitem><simpara> a string with the value of the new symlink.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> on the creation of a new symlink, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-query-settable-attributes" role="function">
<title>g_file_query_settable_attributes ()</title>
<indexterm zone="g-file-query-settable-attributes"><primary sortas="file_query_settable_attributes">g_file_query_settable_attributes</primary></indexterm><programlisting><link linkend="GFileAttributeInfoList">GFileAttributeInfoList</link> * g_file_query_settable_attributes
                                                        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Obtain the list of settable attributes for the file.
</para>
<para>
Returns the type and full attribute name of all the attributes 
that can be set on this file. This doesn't mean setting it will always 
succeed though, you might get an access failure, or some specific 
file may not support a specific attribute.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileAttributeInfoList"><type>GFileAttributeInfoList</type></link> describing the settable attributes.
When you are done with it, release it with <link linkend="g-file-attribute-info-list-unref"><function>g_file_attribute_info_list_unref()</function></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-query-writable-namespaces" role="function">
<title>g_file_query_writable_namespaces ()</title>
<indexterm zone="g-file-query-writable-namespaces"><primary sortas="file_query_writable_namespaces">g_file_query_writable_namespaces</primary></indexterm><programlisting><link linkend="GFileAttributeInfoList">GFileAttributeInfoList</link> * g_file_query_writable_namespaces
                                                        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Obtain the list of attribute namespaces where new attributes 
can be created by a user. An example of this is extended
attributes (in the "xattr" namespace).
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileAttributeInfoList"><type>GFileAttributeInfoList</type></link> describing the writable namespaces.
When you are done with it, release it with <link linkend="g-file-attribute-info-list-unref"><function>g_file_attribute_info_list_unref()</function></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-set-attribute" role="function">
<title>g_file_set_attribute ()</title>
<indexterm zone="g-file-set-attribute"><primary sortas="file_set_attribute">g_file_set_attribute</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_set_attribute                (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attribute,
                                                         <link linkend="GFileAttributeType">GFileAttributeType</link> type,
                                                         <link linkend="gpointer">gpointer</link> value_p,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Sets an attribute in the file with attribute name <parameter>attribute</parameter> to <parameter>value</parameter>.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attribute</parameter>&#160;:</term>
<listitem><simpara> a string containing the attribute's name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&#160;:</term>
<listitem><simpara> The type of the attribute
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value_p</parameter>&#160;:</term>
<listitem><simpara> a pointer to the value (or the pointer itself if the type is a pointer type)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileQueryInfoFlags"><type>GFileQueryInfoFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the attribute was set, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-set-attributes-from-info" role="function">
<title>g_file_set_attributes_from_info ()</title>
<indexterm zone="g-file-set-attributes-from-info"><primary sortas="file_set_attributes_from_info">g_file_set_attributes_from_info</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_set_attributes_from_info     (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileInfo">GFileInfo</link> *info,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Tries to set all attributes in the <link linkend="GFileInfo"><type>GFileInfo</type></link> on the target values, 
not stopping on the first error.
</para>
<para>
If there is any error during this operation then <parameter>error</parameter> will be set to
the first error. Error on particular fields are flagged by setting 
the "status" field in the attribute value to 
<link linkend="G-FILE-ATTRIBUTE-STATUS-ERROR-SETTING--CAPS"><literal>G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING</literal></link>, which means you can also detect
further errors.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>info</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFileInfo"><type>GFileInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> <link linkend="GFileQueryInfoFlags"><type>GFileQueryInfoFlags</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if there was any error, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-set-attributes-async" role="function">
<title>g_file_set_attributes_async ()</title>
<indexterm zone="g-file-set-attributes-async"><primary sortas="file_set_attributes_async">g_file_set_attributes_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_set_attributes_async         (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileInfo">GFileInfo</link> *info,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Asynchronously sets the attributes of <parameter>file</parameter> with <parameter>info</parameter>.
</para>
<para>
For more details, see <link linkend="g-file-set-attributes-from-info"><function>g_file_set_attributes_from_info()</function></link> which is
the synchronous version of this call.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-set-attributes-finish"><function>g_file_set_attributes_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>info</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFileInfo"><type>GFileInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFileQueryInfoFlags"><type>GFileQueryInfoFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>io_priority</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="io-priority">I/O priority</link> 
    of the request. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="gpointer"><type>gpointer</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-set-attributes-finish" role="function">
<title>g_file_set_attributes_finish ()</title>
<indexterm zone="g-file-set-attributes-finish"><primary sortas="file_set_attributes_finish">g_file_set_attributes_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_set_attributes_finish        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GFileInfo">GFileInfo</link> **info,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes setting an attribute started in <link linkend="g-file-set-attributes-async"><function>g_file_set_attributes_async()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>info</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFileInfo"><type>GFileInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the attributes were set correctly, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-set-attribute-string" role="function">
<title>g_file_set_attribute_string ()</title>
<indexterm zone="g-file-set-attribute-string"><primary sortas="file_set_attribute_string">g_file_set_attribute_string</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_set_attribute_string         (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attribute,
                                                         const <link linkend="char">char</link> *value,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Sets <parameter>attribute</parameter> of type <link linkend="G-FILE-ATTRIBUTE-TYPE-STRING--CAPS"><literal>G_FILE_ATTRIBUTE_TYPE_STRING</literal></link> to <parameter>value</parameter>. 
If <parameter>attribute</parameter> is of a different type, this operation will fail.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attribute</parameter>&#160;:</term>
<listitem><simpara> a string containing the attribute's name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara> a string containing the attribute's value.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> <link linkend="GFileQueryInfoFlags"><type>GFileQueryInfoFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <parameter>attribute</parameter> was successfully set, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-set-attribute-byte-string" role="function">
<title>g_file_set_attribute_byte_string ()</title>
<indexterm zone="g-file-set-attribute-byte-string"><primary sortas="file_set_attribute_byte_string">g_file_set_attribute_byte_string</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_set_attribute_byte_string    (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attribute,
                                                         const <link linkend="char">char</link> *value,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Sets <parameter>attribute</parameter> of type <link linkend="G-FILE-ATTRIBUTE-TYPE-BYTE-STRING--CAPS"><literal>G_FILE_ATTRIBUTE_TYPE_BYTE_STRING</literal></link> to <parameter>value</parameter>. 
If <parameter>attribute</parameter> is of a different type, this operation will fail, 
returning <link linkend="FALSE--CAPS"><literal>FALSE</literal></link>. 
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attribute</parameter>&#160;:</term>
<listitem><simpara> a string containing the attribute's name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara> a string containing the attribute's new value.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFileQueryInfoFlags"><type>GFileQueryInfoFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <parameter>attribute</parameter> was successfully set to <parameter>value</parameter> 
in the <parameter>file</parameter>, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-set-attribute-uint32" role="function">
<title>g_file_set_attribute_uint32 ()</title>
<indexterm zone="g-file-set-attribute-uint32"><primary sortas="file_set_attribute_uint32">g_file_set_attribute_uint32</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_set_attribute_uint32         (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attribute,
                                                         <link linkend="guint32">guint32</link> value,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Sets <parameter>attribute</parameter> of type <link linkend="G-FILE-ATTRIBUTE-TYPE-UINT32--CAPS"><literal>G_FILE_ATTRIBUTE_TYPE_UINT32</literal></link> to <parameter>value</parameter>. 
If <parameter>attribute</parameter> is of a different type, this operation will fail.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attribute</parameter>&#160;:</term>
<listitem><simpara> a string containing the attribute's name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="guint32"><type>guint32</type></link> containing the attribute's new value.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFileQueryInfoFlags"><type>GFileQueryInfoFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <parameter>attribute</parameter> was successfully set to <parameter>value</parameter> 
in the <parameter>file</parameter>, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-set-attribute-int32" role="function">
<title>g_file_set_attribute_int32 ()</title>
<indexterm zone="g-file-set-attribute-int32"><primary sortas="file_set_attribute_int32">g_file_set_attribute_int32</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_set_attribute_int32          (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attribute,
                                                         <link linkend="gint32">gint32</link> value,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Sets <parameter>attribute</parameter> of type <link linkend="G-FILE-ATTRIBUTE-TYPE-INT32--CAPS"><literal>G_FILE_ATTRIBUTE_TYPE_INT32</literal></link> to <parameter>value</parameter>. 
If <parameter>attribute</parameter> is of a different type, this operation will fail.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attribute</parameter>&#160;:</term>
<listitem><simpara> a string containing the attribute's name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="gint32"><type>gint32</type></link> containing the attribute's new value.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFileQueryInfoFlags"><type>GFileQueryInfoFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <parameter>attribute</parameter> was successfully set to <parameter>value</parameter> 
in the <parameter>file</parameter>, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise. 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-set-attribute-uint64" role="function">
<title>g_file_set_attribute_uint64 ()</title>
<indexterm zone="g-file-set-attribute-uint64"><primary sortas="file_set_attribute_uint64">g_file_set_attribute_uint64</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_set_attribute_uint64         (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attribute,
                                                         <link linkend="guint64">guint64</link> value,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Sets <parameter>attribute</parameter> of type <link linkend="G-FILE-ATTRIBUTE-TYPE-UINT64--CAPS"><literal>G_FILE_ATTRIBUTE_TYPE_UINT64</literal></link> to <parameter>value</parameter>. 
If <parameter>attribute</parameter> is of a different type, this operation will fail.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attribute</parameter>&#160;:</term>
<listitem><simpara> a string containing the attribute's name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="guint64"><type>guint64</type></link> containing the attribute's new value.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFileQueryInfoFlags"><type>GFileQueryInfoFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <parameter>attribute</parameter> was successfully set to <parameter>value</parameter> 
in the <parameter>file</parameter>, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-set-attribute-int64" role="function">
<title>g_file_set_attribute_int64 ()</title>
<indexterm zone="g-file-set-attribute-int64"><primary sortas="file_set_attribute_int64">g_file_set_attribute_int64</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_set_attribute_int64          (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *attribute,
                                                         <link linkend="gint64">gint64</link> value,
                                                         <link linkend="GFileQueryInfoFlags">GFileQueryInfoFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Sets <parameter>attribute</parameter> of type <link linkend="G-FILE-ATTRIBUTE-TYPE-INT64--CAPS"><literal>G_FILE_ATTRIBUTE_TYPE_INT64</literal></link> to <parameter>value</parameter>. 
If <parameter>attribute</parameter> is of a different type, this operation will fail.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attribute</parameter>&#160;:</term>
<listitem><simpara> a string containing the attribute's name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="guint64"><type>guint64</type></link> containing the attribute's new value.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFileQueryInfoFlags"><type>GFileQueryInfoFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <parameter>attribute</parameter> was successfully set, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-mount-mountable" role="function">
<title>g_file_mount_mountable ()</title>
<indexterm zone="g-file-mount-mountable"><primary sortas="file_mount_mountable">g_file_mount_mountable</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_mount_mountable              (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GMountMountFlags">GMountMountFlags</link> flags,
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Mounts a file of type G_FILE_TYPE_MOUNTABLE.
Using <parameter>mount_operation</parameter>, you can request callbacks when, for instance, 
passwords are needed during authentication.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-mount-mountable-finish"><function>g_file_mount_mountable_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> flags affecting the operation
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mount_operation</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GMountOperation"><type>GMountOperation</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to avoid user interaction.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-mount-mountable-finish" role="function">
<title>g_file_mount_mountable_finish ()</title>
<indexterm zone="g-file-mount-mountable-finish"><primary sortas="file_mount_mountable_finish">g_file_mount_mountable_finish</primary></indexterm><programlisting><link linkend="GFile">GFile</link> *             g_file_mount_mountable_finish       (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes a mount operation. See <link linkend="g-file-mount-mountable"><function>g_file_mount_mountable()</function></link> for details.
</para>
<para>
Finish an asynchronous mount operation that was started 
with <link linkend="g-file-mount-mountable"><function>g_file_mount_mountable()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFile"><type>GFile</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-unmount-mountable" role="function" condition="deprecated:2.22: Use g_file_unmount_mountable_with_operation() instead.">
<title>g_file_unmount_mountable ()</title>
<indexterm zone="g-file-unmount-mountable" role="deprecated"><primary sortas="file_unmount_mountable">g_file_unmount_mountable</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_unmount_mountable            (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<warning><para><literal>g_file_unmount_mountable</literal> has been deprecated since version 2.22 and should not be used in newly-written code. Use <link linkend="g-file-unmount-mountable-with-operation"><function>g_file_unmount_mountable_with_operation()</function></link> instead.</para></warning>
<para>
Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-unmount-mountable-finish"><function>g_file_unmount_mountable_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> flags affecting the operation
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-unmount-mountable-finish" role="function" condition="deprecated:2.22: Use g_file_unmount_mountable_with_operation_finish() instead.">
<title>g_file_unmount_mountable_finish ()</title>
<indexterm zone="g-file-unmount-mountable-finish" role="deprecated"><primary sortas="file_unmount_mountable_finish">g_file_unmount_mountable_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_unmount_mountable_finish     (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<warning><para><literal>g_file_unmount_mountable_finish</literal> has been deprecated since version 2.22 and should not be used in newly-written code. Use <link linkend="g-file-unmount-mountable-with-operation-finish"><function>g_file_unmount_mountable_with_operation_finish()</function></link> instead.</para></warning>
<para>
Finishes an unmount operation, see <link linkend="g-file-unmount-mountable"><function>g_file_unmount_mountable()</function></link> for details.
</para>
<para>
Finish an asynchronous unmount operation that was started 
with <link linkend="g-file-unmount-mountable"><function>g_file_unmount_mountable()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the operation finished successfully. <link linkend="FALSE--CAPS"><literal>FALSE</literal></link>
otherwise.

</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-unmount-mountable-with-operation" role="function" condition="since:2.22">
<title>g_file_unmount_mountable_with_operation ()</title>
<indexterm zone="g-file-unmount-mountable-with-operation" role="2.22"><primary sortas="file_unmount_mountable_with_operation">g_file_unmount_mountable_with_operation</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_unmount_mountable_with_operation
                                                        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-unmount-mountable-finish"><function>g_file_unmount_mountable_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> flags affecting the operation
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mount_operation</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GMountOperation"><type>GMountOperation</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to avoid user interaction.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-unmount-mountable-with-operation-finish" role="function" condition="since:2.22">
<title>g_file_unmount_mountable_with_operation_finish ()</title>
<indexterm zone="g-file-unmount-mountable-with-operation-finish" role="2.22"><primary sortas="file_unmount_mountable_with_operation_finish">g_file_unmount_mountable_with_operation_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_unmount_mountable_with_operation_finish
                                                        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an unmount operation, see <link linkend="g-file-unmount-mountable-with-operation"><function>g_file_unmount_mountable_with_operation()</function></link> for details.
</para>
<para>
Finish an asynchronous unmount operation that was started
with <link linkend="g-file-unmount-mountable-with-operation"><function>g_file_unmount_mountable_with_operation()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the operation finished successfully. <link linkend="FALSE--CAPS"><literal>FALSE</literal></link>
otherwise.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-eject-mountable" role="function" condition="deprecated:2.22: Use g_file_eject_mountable_with_operation() instead.">
<title>g_file_eject_mountable ()</title>
<indexterm zone="g-file-eject-mountable" role="deprecated"><primary sortas="file_eject_mountable">g_file_eject_mountable</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_eject_mountable              (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<warning><para><literal>g_file_eject_mountable</literal> has been deprecated since version 2.22 and should not be used in newly-written code. Use <link linkend="g-file-eject-mountable-with-operation"><function>g_file_eject_mountable_with_operation()</function></link> instead.</para></warning>
<para>
Starts an asynchronous eject on a mountable.  
When this operation has completed, <parameter>callback</parameter> will be called with
<parameter>user_user</parameter> data, and the operation can be finalized with 
<link linkend="g-file-eject-mountable-finish"><function>g_file_eject_mountable_finish()</function></link>.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> flags affecting the operation
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-eject-mountable-finish" role="function" condition="deprecated:2.22: Use g_file_eject_mountable_with_operation_finish() instead.">
<title>g_file_eject_mountable_finish ()</title>
<indexterm zone="g-file-eject-mountable-finish" role="deprecated"><primary sortas="file_eject_mountable_finish">g_file_eject_mountable_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_eject_mountable_finish       (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<warning><para><literal>g_file_eject_mountable_finish</literal> has been deprecated since version 2.22 and should not be used in newly-written code. Use <link linkend="g-file-eject-mountable-with-operation-finish"><function>g_file_eject_mountable_with_operation_finish()</function></link> instead.</para></warning>
<para>
Finishes an asynchronous eject operation started by 
<link linkend="g-file-eject-mountable"><function>g_file_eject_mountable()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <parameter>file</parameter> was ejected successfully. <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> 
otherwise.

</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-eject-mountable-with-operation" role="function" condition="since:2.22">
<title>g_file_eject_mountable_with_operation ()</title>
<indexterm zone="g-file-eject-mountable-with-operation" role="2.22"><primary sortas="file_eject_mountable_with_operation">g_file_eject_mountable_with_operation</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_eject_mountable_with_operation
                                                        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Starts an asynchronous eject on a mountable.
When this operation has completed, <parameter>callback</parameter> will be called with
<parameter>user_user</parameter> data, and the operation can be finalized with
<link linkend="g-file-eject-mountable-with-operation-finish"><function>g_file_eject_mountable_with_operation_finish()</function></link>.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> flags affecting the operation
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mount_operation</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GMountOperation"><type>GMountOperation</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to avoid user interaction.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-eject-mountable-with-operation-finish" role="function" condition="since:2.22">
<title>g_file_eject_mountable_with_operation_finish ()</title>
<indexterm zone="g-file-eject-mountable-with-operation-finish" role="2.22"><primary sortas="file_eject_mountable_with_operation_finish">g_file_eject_mountable_with_operation_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_eject_mountable_with_operation_finish
                                                        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an asynchronous eject operation started by
<link linkend="g-file-eject-mountable-with-operation"><function>g_file_eject_mountable_with_operation()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <parameter>file</parameter> was ejected successfully. <link linkend="FALSE--CAPS"><literal>FALSE</literal></link>
otherwise.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-start-mountable" role="function" condition="since:2.22">
<title>g_file_start_mountable ()</title>
<indexterm zone="g-file-start-mountable" role="2.22"><primary sortas="file_start_mountable">g_file_start_mountable</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_start_mountable              (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GDriveStartFlags">GDriveStartFlags</link> flags,
                                                         <link linkend="GMountOperation">GMountOperation</link> *start_operation,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Starts a file of type G_FILE_TYPE_MOUNTABLE.
Using <parameter>start_operation</parameter>, you can request callbacks when, for instance,
passwords are needed during authentication.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-mount-mountable-finish"><function>g_file_mount_mountable_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> flags affecting the operation
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start_operation</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GMountOperation"><type>GMountOperation</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to avoid user interaction.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-start-mountable-finish" role="function" condition="since:2.22">
<title>g_file_start_mountable_finish ()</title>
<indexterm zone="g-file-start-mountable-finish" role="2.22"><primary sortas="file_start_mountable_finish">g_file_start_mountable_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_start_mountable_finish       (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes a start operation. See <link linkend="g-file-start-mountable"><function>g_file_start_mountable()</function></link> for details.
</para>
<para>
Finish an asynchronous start operation that was started
with <link linkend="g-file-start-mountable"><function>g_file_start_mountable()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the operation finished successfully. <link linkend="FALSE--CAPS"><literal>FALSE</literal></link>
otherwise.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-stop-mountable" role="function" condition="since:2.22">
<title>g_file_stop_mountable ()</title>
<indexterm zone="g-file-stop-mountable" role="2.22"><primary sortas="file_stop_mountable">g_file_stop_mountable</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_stop_mountable               (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Stops a file of type G_FILE_TYPE_MOUNTABLE.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-stop-mountable-finish"><function>g_file_stop_mountable_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> flags affecting the operation
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mount_operation</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GMountOperation"><type>GMountOperation</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to avoid user interaction.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-stop-mountable-finish" role="function" condition="since:2.22">
<title>g_file_stop_mountable_finish ()</title>
<indexterm zone="g-file-stop-mountable-finish" role="2.22"><primary sortas="file_stop_mountable_finish">g_file_stop_mountable_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_stop_mountable_finish        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an stop operation, see <link linkend="g-file-stop-mountable"><function>g_file_stop_mountable()</function></link> for details.
</para>
<para>
Finish an asynchronous stop operation that was started
with <link linkend="g-file-stop-mountable"><function>g_file_stop_mountable()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the operation finished successfully. <link linkend="FALSE--CAPS"><literal>FALSE</literal></link>
otherwise.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-poll-mountable" role="function" condition="since:2.22">
<title>g_file_poll_mountable ()</title>
<indexterm zone="g-file-poll-mountable" role="2.22"><primary sortas="file_poll_mountable">g_file_poll_mountable</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_poll_mountable               (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Polls a file of type G_FILE_TYPE_MOUNTABLE.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-mount-mountable-finish"><function>g_file_mount_mountable_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-poll-mountable-finish" role="function" condition="since:2.22">
<title>g_file_poll_mountable_finish ()</title>
<indexterm zone="g-file-poll-mountable-finish" role="2.22"><primary sortas="file_poll_mountable_finish">g_file_poll_mountable_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_poll_mountable_finish        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes a poll operation. See <link linkend="g-file-poll-mountable"><function>g_file_poll_mountable()</function></link> for details.
</para>
<para>
Finish an asynchronous poll operation that was polled
with <link linkend="g-file-poll-mountable"><function>g_file_poll_mountable()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the operation finished successfully. <link linkend="FALSE--CAPS"><literal>FALSE</literal></link>
otherwise.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-mount-enclosing-volume" role="function">
<title>g_file_mount_enclosing_volume ()</title>
<indexterm zone="g-file-mount-enclosing-volume"><primary sortas="file_mount_enclosing_volume">g_file_mount_enclosing_volume</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_mount_enclosing_volume       (<link linkend="GFile">GFile</link> *location,
                                                         <link linkend="GMountMountFlags">GMountMountFlags</link> flags,
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Starts a <parameter>mount_operation</parameter>, mounting the volume that contains the file <parameter>location</parameter>. 
</para>
<para>
When this operation has completed, <parameter>callback</parameter> will be called with
<parameter>user_user</parameter> data, and the operation can be finalized with 
<link linkend="g-file-mount-enclosing-volume-finish"><function>g_file_mount_enclosing_volume_finish()</function></link>.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>location</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> flags affecting the operation
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mount_operation</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GMountOperation"><type>GMountOperation</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to avoid user interaction.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-mount-enclosing-volume-finish" role="function">
<title>g_file_mount_enclosing_volume_finish ()</title>
<indexterm zone="g-file-mount-enclosing-volume-finish"><primary sortas="file_mount_enclosing_volume_finish">g_file_mount_enclosing_volume_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_mount_enclosing_volume_finish
                                                        (<link linkend="GFile">GFile</link> *location,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes a mount operation started by <link linkend="g-file-mount-enclosing-volume"><function>g_file_mount_enclosing_volume()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>location</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if successful. If an error
has occurred, this function will return <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> and set <parameter>error</parameter>
appropriately if present.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-monitor-directory" role="function">
<title>g_file_monitor_directory ()</title>
<indexterm zone="g-file-monitor-directory"><primary sortas="file_monitor_directory">g_file_monitor_directory</primary></indexterm><programlisting><link linkend="GFileMonitor">GFileMonitor</link>*       g_file_monitor_directory            (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileMonitorFlags">GFileMonitorFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Obtains a directory monitor for the given file.
This may fail if directory monitoring is not supported.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileMonitorFlags"><type>GFileMonitorFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileMonitor"><type>GFileMonitor</type></link> for the given <parameter>file</parameter>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-monitor-file" role="function">
<title>g_file_monitor_file ()</title>
<indexterm zone="g-file-monitor-file"><primary sortas="file_monitor_file">g_file_monitor_file</primary></indexterm><programlisting><link linkend="GFileMonitor">GFileMonitor</link>*       g_file_monitor_file                 (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileMonitorFlags">GFileMonitorFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Obtains a file monitor for the given file. If no file notification
mechanism exists, then regular polling of the file is used.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileMonitorFlags"><type>GFileMonitorFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileMonitor"><type>GFileMonitor</type></link> for the given <parameter>file</parameter>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-monitor" role="function" condition="since:2.18">
<title>g_file_monitor ()</title>
<indexterm zone="g-file-monitor" role="2.18"><primary sortas="file_monitor">g_file_monitor</primary></indexterm><programlisting><link linkend="GFileMonitor">GFileMonitor</link>*       g_file_monitor                      (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileMonitorFlags">GFileMonitorFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Obtains a file or directory monitor for the given file, depending
on the type of the file.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileMonitorFlags"><type>GFileMonitorFlags</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileMonitor"><type>GFileMonitor</type></link> for the given <parameter>file</parameter>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.18</para></refsect2>
<refsect2 id="g-file-load-contents" role="function">
<title>g_file_load_contents ()</title>
<indexterm zone="g-file-load-contents"><primary sortas="file_load_contents">g_file_load_contents</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_load_contents                (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="char">char</link> **contents,
                                                         <link linkend="gsize">gsize</link> *length,
                                                         <link linkend="char">char</link> **etag_out,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Loads the content of the file into memory. The data is always 
zero-terminated, but this is not included in the resultant <parameter>length</parameter>.
The returned <parameter>content</parameter> should be freed with <link linkend="g-free"><function>g_free()</function></link> when no longer
needed.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>contents</parameter>&#160;:</term>
<listitem><simpara> a location to place the contents of the file.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>length</parameter>&#160;:</term>
<listitem><simpara> a location to place the length of the contents of the file,
   or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the length is not needed
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>etag_out</parameter>&#160;:</term>
<listitem><simpara> a location to place the current entity tag for the file,
   or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the entity tag is not needed
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <parameter>file</parameter>'s contents were successfully loaded.
<link linkend="FALSE--CAPS"><literal>FALSE</literal></link> if there were errors.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-load-contents-async" role="function">
<title>g_file_load_contents_async ()</title>
<indexterm zone="g-file-load-contents-async"><primary sortas="file_load_contents_async">g_file_load_contents_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_load_contents_async          (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Starts an asynchronous load of the <parameter>file</parameter>'s contents.
</para>
<para>
For more details, see <link linkend="g-file-load-contents"><function>g_file_load_contents()</function></link> which is
the synchronous version of this call.
</para>
<para>
When the load operation has completed, <parameter>callback</parameter> will be called 
with <parameter>user</parameter> data. To finish the operation, call 
<link linkend="g-file-load-contents-finish"><function>g_file_load_contents_finish()</function></link> with the <link linkend="GAsyncResult"><type>GAsyncResult</type></link> returned by 
the <parameter>callback</parameter>.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-load-contents-finish" role="function">
<title>g_file_load_contents_finish ()</title>
<indexterm zone="g-file-load-contents-finish"><primary sortas="file_load_contents_finish">g_file_load_contents_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_load_contents_finish         (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="char">char</link> **contents,
                                                         <link linkend="gsize">gsize</link> *length,
                                                         <link linkend="char">char</link> **etag_out,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an asynchronous load of the <parameter>file</parameter>'s contents. 
The contents are placed in <parameter>contents</parameter>, and <parameter>length</parameter> is set to the 
size of the <parameter>contents</parameter> string. The <parameter>content</parameter> should be freed with
<link linkend="g-free"><function>g_free()</function></link> when no longer needed. If <parameter>etag_out</parameter> is present, it will be 
set to the new entity tag for the <parameter>file</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>contents</parameter>&#160;:</term>
<listitem><simpara> a location to place the contents of the file.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>length</parameter>&#160;:</term>
<listitem><simpara> a location to place the length of the contents of the file,
    or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the length is not needed
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>etag_out</parameter>&#160;:</term>
<listitem><simpara> a location to place the current entity tag for the file,
    or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the entity tag is not needed
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the load was successful. If <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> and <parameter>error</parameter> is 
present, it will be set appropriately. 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-load-partial-contents-async" role="function">
<title>g_file_load_partial_contents_async ()</title>
<indexterm zone="g-file-load-partial-contents-async"><primary sortas="file_load_partial_contents_async">g_file_load_partial_contents_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_load_partial_contents_async  (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GFileReadMoreCallback">GFileReadMoreCallback</link> read_more_callback,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Reads the partial contents of a file. A <link linkend="GFileReadMoreCallback"><type>GFileReadMoreCallback</type></link> should be 
used to stop reading from the file when appropriate, else this function
will behave exactly as <link linkend="g-file-load-contents-async"><function>g_file_load_contents_async()</function></link>. This operation 
can be finished by <link linkend="g-file-load-partial-contents-finish"><function>g_file_load_partial_contents_finish()</function></link>.
</para>
<para>
Users of this function should be aware that <parameter>user_data</parameter> is passed to 
both the <parameter>read_more_callback</parameter> and the <parameter>callback</parameter>.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>read_more_callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFileReadMoreCallback"><type>GFileReadMoreCallback</type></link> to receive partial data and to specify whether further data should be read.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to the callback functions.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-load-partial-contents-finish" role="function">
<title>g_file_load_partial_contents_finish ()</title>
<indexterm zone="g-file-load-partial-contents-finish"><primary sortas="file_load_partial_contents_finish">g_file_load_partial_contents_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_load_partial_contents_finish (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="char">char</link> **contents,
                                                         <link linkend="gsize">gsize</link> *length,
                                                         <link linkend="char">char</link> **etag_out,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an asynchronous partial load operation that was started
with <link linkend="g-file-load-partial-contents-async"><function>g_file_load_partial_contents_async()</function></link>. The data is always 
zero-terminated, but this is not included in the resultant <parameter>length</parameter>.
The returned <parameter>content</parameter> should be freed with <link linkend="g-free"><function>g_free()</function></link> when no longer
needed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>contents</parameter>&#160;:</term>
<listitem><simpara> a location to place the contents of the file.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>length</parameter>&#160;:</term>
<listitem><simpara> a location to place the length of the contents of the file,
    or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the length is not needed
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>etag_out</parameter>&#160;:</term>
<listitem><simpara> a location to place the current entity tag for the file,
    or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the entity tag is not needed
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the load was successful. If <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> and <parameter>error</parameter> is 
present, it will be set appropriately. 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-replace-contents" role="function">
<title>g_file_replace_contents ()</title>
<indexterm zone="g-file-replace-contents"><primary sortas="file_replace_contents">g_file_replace_contents</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_replace_contents             (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *contents,
                                                         <link linkend="gsize">gsize</link> length,
                                                         const <link linkend="char">char</link> *etag,
                                                         <link linkend="gboolean">gboolean</link> make_backup,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="char">char</link> **new_etag,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Replaces the contents of <parameter>file</parameter> with <parameter>contents</parameter> of <parameter>length</parameter> bytes.
 
If <parameter>etag</parameter> is specified (not <link linkend="NULL--CAPS"><literal>NULL</literal></link>) any existing file must have that etag, or
the error <link linkend="G-IO-ERROR-WRONG-ETAG--CAPS"><literal>G_IO_ERROR_WRONG_ETAG</literal></link> will be returned.
</para>
<para>
If <parameter>make_backup</parameter> is <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, this function will attempt to make a backup of <parameter>file</parameter>.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned. 
</para>
<para>
The returned <parameter>new_etag</parameter> can be used to verify that the file hasn't changed the
next time it is saved over.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>contents</parameter>&#160;:</term>
<listitem><simpara> a string containing the new contents for <parameter>file</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>length</parameter>&#160;:</term>
<listitem><simpara> the length of <parameter>contents</parameter> in bytes.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>etag</parameter>&#160;:</term>
<listitem><simpara> the old <link linkend="gfile-etag">entity tag</link> 
    for the document, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>make_backup</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if a backup should be created.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileCreateFlags"><type>GFileCreateFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new_etag</parameter>&#160;:</term>
<listitem><simpara> a location to a new <link linkend="gfile-etag">entity tag</link>
     for the document. This should be freed with <link linkend="g-free"><function>g_free()</function></link> when no longer 
     needed, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if successful. If an error
has occurred, this function will return <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> and set <parameter>error</parameter>
appropriately if present.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-replace-contents-async" role="function">
<title>g_file_replace_contents_async ()</title>
<indexterm zone="g-file-replace-contents-async"><primary sortas="file_replace_contents_async">g_file_replace_contents_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_replace_contents_async       (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *contents,
                                                         <link linkend="gsize">gsize</link> length,
                                                         const <link linkend="char">char</link> *etag,
                                                         <link linkend="gboolean">gboolean</link> make_backup,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Starts an asynchronous replacement of <parameter>file</parameter> with the given 
<parameter>contents</parameter> of <parameter>length</parameter> bytes. <parameter>etag</parameter> will replace the document's 
current entity tag.
</para>
<para>
When this operation has completed, <parameter>callback</parameter> will be called with
<parameter>user_user</parameter> data, and the operation can be finalized with 
<link linkend="g-file-replace-contents-finish"><function>g_file_replace_contents_finish()</function></link>.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned. 
</para>
<para>
If <parameter>make_backup</parameter> is <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, this function will attempt to 
make a backup of <parameter>file</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>contents</parameter>&#160;:</term>
<listitem><simpara> string of contents to replace the file with.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>length</parameter>&#160;:</term>
<listitem><simpara> the length of <parameter>contents</parameter> in bytes.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>etag</parameter>&#160;:</term>
<listitem><simpara> a new <link linkend="gfile-etag">entity tag</link> for the <parameter>file</parameter>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>make_backup</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if a backup should be created.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileCreateFlags"><type>GFileCreateFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-replace-contents-finish" role="function">
<title>g_file_replace_contents_finish ()</title>
<indexterm zone="g-file-replace-contents-finish"><primary sortas="file_replace_contents_finish">g_file_replace_contents_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_replace_contents_finish      (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="char">char</link> **new_etag,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an asynchronous replace of the given <parameter>file</parameter>. See
<link linkend="g-file-replace-contents-async"><function>g_file_replace_contents_async()</function></link>. Sets <parameter>new_etag</parameter> to the new entity 
tag for the document, if present.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new_etag</parameter>&#160;:</term>
<listitem><simpara> a location of a new <link linkend="gfile-etag">entity tag</link> 
    for the document. This should be freed with <link linkend="g-free"><function>g_free()</function></link> when it is no 
    longer needed, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> on success, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-copy-attributes" role="function">
<title>g_file_copy_attributes ()</title>
<indexterm zone="g-file-copy-attributes"><primary sortas="file_copy_attributes">g_file_copy_attributes</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_file_copy_attributes              (<link linkend="GFile">GFile</link> *source,
                                                         <link linkend="GFile">GFile</link> *destination,
                                                         <link linkend="GFileCopyFlags">GFileCopyFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Copies the file attributes from <parameter>source</parameter> to <parameter>destination</parameter>. 
</para>
<para>
Normally only a subset of the file attributes are copied,
those that are copies in a normal file copy operation
(which for instance does not include e.g. owner). However
if <link linkend="G-FILE-COPY-ALL-METADATA--CAPS"><type>G_FILE_COPY_ALL_METADATA</type></link> is specified in <parameter>flags</parameter>, then
all the metadata that is possible to copy is copied. This
is useful when implementing move by copy + delete source.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFile"><type>GFile</type></link> with attributes.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>destination</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFile"><type>GFile</type></link> to copy attributes to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileCopyFlags"><type>GFileCopyFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the attributes were copied successfully, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-file-create-readwrite" role="function" condition="since:2.22">
<title>g_file_create_readwrite ()</title>
<indexterm zone="g-file-create-readwrite" role="2.22"><primary sortas="file_create_readwrite">g_file_create_readwrite</primary></indexterm><programlisting><link linkend="GFileIOStream">GFileIOStream</link> *     g_file_create_readwrite             (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Creates a new file and returns a stream for reading and writing to it.
The file must not already exist.
</para>
<para>
By default files created are generally readable by everyone,
but if you pass <link linkend="G-FILE-CREATE-PRIVATE--CAPS"><type>G_FILE_CREATE_PRIVATE</type></link> in <parameter>flags</parameter> the file
will be made readable only to the current user, to the level that
is supported on the target filesystem.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.
</para>
<para>
If a file or directory with this name already exists the <link linkend="G-IO-ERROR-EXISTS--CAPS"><literal>G_IO_ERROR_EXISTS</literal></link>
error will be returned. Some file systems don't allow all file names,
and may return an <link linkend="G-IO-ERROR-INVALID-FILENAME--CAPS"><literal>G_IO_ERROR_INVALID_FILENAME</literal></link> error, and if the name
is too long, <link linkend="G-IO-ERROR-FILENAME-TOO-LONG--CAPS"><literal>G_IO_ERROR_FILENAME_TOO_LONG</literal></link> will be returned. Other errors
are possible too, and depend on what kind of filesystem the file is on.
</para>
<para>
Note that in many non-local file cases read and write streams are not
supported, so make sure you really need to do read and write streaming,
rather than just opening for reading or writing.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFile"><type>GFile</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileCreateFlags"><type>GFileCreateFlags</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileIOStream"><type>GFileIOStream</type></link> for the newly created file, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-create-readwrite-async" role="function" condition="since:2.22">
<title>g_file_create_readwrite_async ()</title>
<indexterm zone="g-file-create-readwrite-async" role="2.22"><primary sortas="file_create_readwrite_async">g_file_create_readwrite_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_create_readwrite_async       (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Asynchronously creates a new file and returns a stream for reading and
writing to it. The file must not already exist.
</para>
<para>
For more details, see <link linkend="g-file-create-readwrite"><function>g_file_create_readwrite()</function></link> which is
the synchronous version of this call.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then
call <link linkend="g-file-create-readwrite-finish"><function>g_file_create_readwrite_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileCreateFlags"><type>GFileCreateFlags</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>io_priority</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="io-priority">I/O priority</link>
    of the request
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-create-readwrite-finish" role="function" condition="since:2.22">
<title>g_file_create_readwrite_finish ()</title>
<indexterm zone="g-file-create-readwrite-finish" role="2.22"><primary sortas="file_create_readwrite_finish">g_file_create_readwrite_finish</primary></indexterm><programlisting><link linkend="GFileIOStream">GFileIOStream</link> *     g_file_create_readwrite_finish      (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an asynchronous file create operation started with
<link linkend="g-file-create-readwrite-async"><function>g_file_create_readwrite_async()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileIOStream"><type>GFileIOStream</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-open-readwrite" role="function" condition="since:2.22">
<title>g_file_open_readwrite ()</title>
<indexterm zone="g-file-open-readwrite" role="2.22"><primary sortas="file_open_readwrite">g_file_open_readwrite</primary></indexterm><programlisting><link linkend="GFileIOStream">GFileIOStream</link> *     g_file_open_readwrite               (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Opens an existing file for reading and writing. The result is
a <link linkend="GFileIOStream"><type>GFileIOStream</type></link> that can be used to read and write the contents of the file.
</para>
<para>
If <parameter>cancellable</parameter> is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> will be returned.
</para>
<para>
If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
Other errors are possible too, and depend on what kind of filesystem the file is on.
Note that in many non-local file cases read and write streams are not supported,
so make sure you really need to do read and write streaming, rather than
just opening for reading or writing.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> <link linkend="GFile"><type>GFile</type></link> to open
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GCancellable"><type>GCancellable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="GFileIOStream"><type>GFileIOStream</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-open-readwrite-async" role="function" condition="since:2.22">
<title>g_file_open_readwrite_async ()</title>
<indexterm zone="g-file-open-readwrite-async" role="2.22"><primary sortas="file_open_readwrite_async">g_file_open_readwrite_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_open_readwrite_async         (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Asynchronously opens <parameter>file</parameter> for reading and writing.
</para>
<para>
For more details, see <link linkend="g-file-open-readwrite"><function>g_file_open_readwrite()</function></link> which is
the synchronous version of this call.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then call
<link linkend="g-file-open-readwrite-finish"><function>g_file_open_readwrite_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>io_priority</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="io-priority">I/O priority</link>
    of the request.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-open-readwrite-finish" role="function" condition="since:2.22">
<title>g_file_open_readwrite_finish ()</title>
<indexterm zone="g-file-open-readwrite-finish" role="2.22"><primary sortas="file_open_readwrite_finish">g_file_open_readwrite_finish</primary></indexterm><programlisting><link linkend="GFileIOStream">GFileIOStream</link> *     g_file_open_readwrite_finish        (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an asynchronous file read operation started with
<link linkend="g-file-open-readwrite-async"><function>g_file_open_readwrite_async()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileIOStream"><type>GFileIOStream</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-replace-readwrite" role="function" condition="since:2.22">
<title>g_file_replace_readwrite ()</title>
<indexterm zone="g-file-replace-readwrite" role="2.22"><primary sortas="file_replace_readwrite">g_file_replace_readwrite</primary></indexterm><programlisting><link linkend="GFileIOStream">GFileIOStream</link> *     g_file_replace_readwrite            (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *etag,
                                                         <link linkend="gboolean">gboolean</link> make_backup,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Returns an output stream for overwriting the file in readwrite mode,
possibly creating a backup copy of the file first. If the file doesn't
exist, it will be created.
</para>
<para>
For details about the behaviour, see <link linkend="g-file-replace"><function>g_file_replace()</function></link> which does the same
thing but returns an output stream only.
</para>
<para>
Note that in many non-local file cases read and write streams are not
supported, so make sure you really need to do read and write streaming,
rather than just opening for reading or writing.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GFile"><type>GFile</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>etag</parameter>&#160;:</term>
<listitem><simpara> an optional <link linkend="gfile-etag">entity tag</link> for the
    current <link linkend="GFile"><type>GFile</type></link>, or <link linkend="NULL--CAPS"><type>NULL</type></link> to ignore
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>make_backup</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if a backup should be created
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileCreateFlags"><type>GFileCreateFlags</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileIOStream"><type>GFileIOStream</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-replace-readwrite-async" role="function" condition="since:2.22">
<title>g_file_replace_readwrite_async ()</title>
<indexterm zone="g-file-replace-readwrite-async" role="2.22"><primary sortas="file_replace_readwrite_async">g_file_replace_readwrite_async</primary></indexterm><programlisting><link linkend="void">void</link>                g_file_replace_readwrite_async      (<link linkend="GFile">GFile</link> *file,
                                                         const <link linkend="char">char</link> *etag,
                                                         <link linkend="gboolean">gboolean</link> make_backup,
                                                         <link linkend="GFileCreateFlags">GFileCreateFlags</link> flags,
                                                         <link linkend="int">int</link> io_priority,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Asynchronously overwrites the file in read-write mode, replacing the
contents, possibly creating a backup copy of the file first.
</para>
<para>
For more details, see <link linkend="g-file-replace-readwrite"><function>g_file_replace_readwrite()</function></link> which is
the synchronous version of this call.
</para>
<para>
When the operation is finished, <parameter>callback</parameter> will be called. You can then
call <link linkend="g-file-replace-readwrite-finish"><function>g_file_replace_readwrite_finish()</function></link> to get the result of the operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>etag</parameter>&#160;:</term>
<listitem><simpara> an <link linkend="gfile-etag">entity tag</link> for the
    current <link linkend="GFile"><type>GFile</type></link>, or NULL to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>make_backup</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if a backup should be created.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a set of <link linkend="GFileCreateFlags"><type>GFileCreateFlags</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>io_priority</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="io-priority">I/O priority</link>
    of the request.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when the request is satisfied
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to callback function
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-file-replace-readwrite-finish" role="function" condition="since:2.22">
<title>g_file_replace_readwrite_finish ()</title>
<indexterm zone="g-file-replace-readwrite-finish" role="2.22"><primary sortas="file_replace_readwrite_finish">g_file_replace_readwrite_finish</primary></indexterm><programlisting><link linkend="GFileIOStream">GFileIOStream</link> *     g_file_replace_readwrite_finish     (<link linkend="GFile">GFile</link> *file,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes an asynchronous file replace operation started with
<link linkend="g-file-replace-readwrite-async"><function>g_file_replace_readwrite_async()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> input <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GFileIOStream"><type>GFileIOStream</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>

</refsect1>



<refsect1 id="GFile.see-also">
<title>See Also</title>
#GFileInfo, <link linkend="GFileEnumerator"><type>GFileEnumerator</type></link>
</refsect1>

</refentry>
