• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GIO - GLib Input, Output and Streaming Library
2  *
3  * Copyright (C) 2006-2007 Red Hat, Inc.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General
16  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
17  *
18  * Author: Alexander Larsson <alexl@redhat.com>
19  */
20 
21 #ifndef __G_FILE_H__
22 #define __G_FILE_H__
23 
24 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
25 #error "Only <gio/gio.h> can be included directly."
26 #endif
27 
28 #include <gio/giotypes.h>
29 
30 G_BEGIN_DECLS
31 
32 #define G_TYPE_FILE            (g_file_get_type ())
33 #define G_FILE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE, GFile))
34 #define G_IS_FILE(obj)	       (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE))
35 #define G_FILE_GET_IFACE(obj)  (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE, GFileIface))
36 
37 #if 0
38 /**
39  * GFile:
40  *
41  * A handle to an object implementing the #GFileIface interface.
42  * Generally stores a location within the file system. Handles do not
43  * necessarily represent files or directories that currently exist.
44  **/
45 typedef struct _GFile         		GFile; /* Dummy typedef */
46 #endif
47 typedef struct _GFileIface    		GFileIface;
48 
49 
50 /**
51  * GFileIface:
52  * @g_iface: The parent interface.
53  * @dup: Duplicates a #GFile.
54  * @hash: Creates a hash of a #GFile.
55  * @equal: Checks equality of two given #GFiles.
56  * @is_native: Checks to see if a file is native to the system.
57  * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
58  * @get_uri_scheme: Gets the URI scheme for a #GFile.
59  * @get_basename: Gets the basename for a given #GFile.
60  * @get_path: Gets the current path within a #GFile.
61  * @get_uri: Gets a URI for the path within a #GFile.
62  * @get_parse_name: Gets the parsed name for the #GFile.
63  * @get_parent: Gets the parent directory for the #GFile.
64  * @prefix_matches: Checks whether a #GFile contains a specified file.
65  * @get_relative_path: Gets the path for a #GFile relative to a given path.
66  * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
67  * @get_child_for_display_name: Gets the child #GFile for a given display name.
68  * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
69  * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
70  * @enumerate_children_finish: Finishes asynchronously enumerating the children.
71  * @query_info: Gets the #GFileInfo for a #GFile.
72  * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
73  * @query_info_finish: Finishes an asynchronous query info operation.
74  * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
75  * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
76  * @query_filesystem_info_finish: Finishes asynchronously getting the file system info.
77  * @find_enclosing_mount: Gets a #GMount for the #GFile.
78  * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
79  * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
80  * @set_display_name: Sets the display name for a #GFile.
81  * @set_display_name_async: Asynchronously sets a #GFile's display name.
82  * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
83  * @query_settable_attributes: Returns a list of #GFileAttributeInfos that can be set.
84  * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttributeInfos that can be set.
85  * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
86  * @query_writable_namespaces: Returns a list of #GFileAttributeInfo namespaces that are writable.
87  * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttributeInfo namespaces that are writable.
88  * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
89  * @set_attribute: Sets a #GFileAttributeInfo.
90  * @set_attributes_from_info: Sets a #GFileAttributeInfo with information from a #GFileInfo.
91  * @set_attributes_async: Asynchronously sets a file's attributes.
92  * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
93  * @read_fn: Reads a file asynchronously.
94  * @read_async: Asynchronously reads a file.
95  * @read_finish: Finishes asynchronously reading a file.
96  * @append_to: Writes to the end of a file.
97  * @append_to_async: Asynchronously writes to the end of a file.
98  * @append_to_finish: Finishes an asynchronous file append operation.
99  * @create: Creates a new file.
100  * @create_async: Asynchronously creates a file.
101  * @create_finish: Finishes asynchronously creating a file.
102  * @replace: Replaces the contents of a file.
103  * @replace_async: Asynchronously replaces the contents of a file.
104  * @replace_finish: Finishes asynchronously replacing a file.
105  * @delete_file: Deletes a file.
106  * @delete_file_async: Asynchronously deletes a file.
107  * @delete_file_finish: Finishes an asynchronous delete.
108  * @trash: Sends a #GFile to the Trash location.
109  * @trash_async: Asynchronously sends a #GFile to the Trash location.
110  * @trash_finish: Finishes an asynchronous file trashing operation.
111  * @make_directory: Makes a directory.
112  * @make_directory_async: Asynchronously makes a directory.
113  * @make_directory_finish: Finishes making a directory asynchronously.
114  * @make_symbolic_link: (nullable): Makes a symbolic link. %NULL if symbolic
115  *    links are unsupported.
116  * @_make_symbolic_link_async: Asynchronously makes a symbolic link
117  * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
118  * @copy: (nullable): Copies a file. %NULL if copying is unsupported, which will
119  *     cause `GFile` to use a fallback copy method where it reads from the
120  *     source and writes to the destination.
121  * @copy_async: Asynchronously copies a file.
122  * @copy_finish: Finishes an asynchronous copy operation.
123  * @move: Moves a file.
124  * @_move_async: Asynchronously moves a file.
125  * @_move_finish: Finishes an asynchronous move operation.
126  * @mount_mountable: Mounts a mountable object.
127  * @mount_mountable_finish: Finishes a mounting operation.
128  * @unmount_mountable: Unmounts a mountable object.
129  * @unmount_mountable_finish: Finishes an unmount operation.
130  * @eject_mountable: Ejects a mountable.
131  * @eject_mountable_finish: Finishes an eject operation.
132  * @mount_enclosing_volume: Mounts a specified location.
133  * @mount_enclosing_volume_finish: Finishes mounting a specified location.
134  * @monitor_dir: Creates a #GFileMonitor for the location.
135  * @monitor_file: Creates a #GFileMonitor for the location.
136  * @open_readwrite: Open file read/write. Since 2.22.
137  * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22.
138  * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22.
139  * @create_readwrite: Creates file read/write. Since 2.22.
140  * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22.
141  * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22.
142  * @replace_readwrite: Replaces file read/write. Since 2.22.
143  * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22.
144  * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22.
145  * @start_mountable: Starts a mountable object. Since 2.22.
146  * @start_mountable_finish: Finishes a start operation. Since 2.22.
147  * @stop_mountable: Stops a mountable. Since 2.22.
148  * @stop_mountable_finish: Finishes a stop operation. Since 2.22.
149  * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22.
150  * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22.
151  * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22.
152  * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22.
153  * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
154  * @poll_mountable: Polls a mountable object for media changes. Since 2.22.
155  * @poll_mountable_finish: Finishes a poll operation for media changes. Since 2.22.
156  * @measure_disk_usage: Recursively measures the disk usage of @file. Since 2.38
157  * @measure_disk_usage_async: Asynchronously recursively measures the disk usage of @file. Since 2.38
158  * @measure_disk_usage_finish: Finishes an asynchronous recursive measurement of the disk usage of @file. Since 2.38
159  *
160  * An interface for writing VFS file handles.
161  **/
162 struct _GFileIface
163 {
164   GTypeInterface g_iface;
165 
166   /* Virtual Table */
167 
168   GFile *             (* dup)                         (GFile         *file);
169   guint               (* hash)                        (GFile         *file);
170   gboolean            (* equal)                       (GFile         *file1,
171                                                        GFile         *file2);
172   gboolean            (* is_native)                   (GFile         *file);
173   gboolean            (* has_uri_scheme)              (GFile         *file,
174                                                        const char    *uri_scheme);
175   char *              (* get_uri_scheme)              (GFile         *file);
176   char *              (* get_basename)                (GFile         *file);
177   char *              (* get_path)                    (GFile         *file);
178   char *              (* get_uri)                     (GFile         *file);
179   char *              (* get_parse_name)              (GFile         *file);
180   GFile *             (* get_parent)                  (GFile         *file);
181   gboolean            (* prefix_matches)              (GFile         *prefix,
182                                                        GFile         *file);
183   char *              (* get_relative_path)           (GFile         *parent,
184                                                        GFile         *descendant);
185   GFile *             (* resolve_relative_path)       (GFile        *file,
186                                                        const char   *relative_path);
187   GFile *             (* get_child_for_display_name)  (GFile        *file,
188                                                        const char   *display_name,
189                                                        GError      **error);
190 
191   GFileEnumerator *   (* enumerate_children)          (GFile                *file,
192                                                        const char           *attributes,
193                                                        GFileQueryInfoFlags   flags,
194                                                        GCancellable         *cancellable,
195                                                        GError              **error);
196   void                (* enumerate_children_async)    (GFile                *file,
197                                                        const char           *attributes,
198                                                        GFileQueryInfoFlags   flags,
199                                                        int                   io_priority,
200                                                        GCancellable         *cancellable,
201                                                        GAsyncReadyCallback   callback,
202                                                        gpointer              user_data);
203   GFileEnumerator *   (* enumerate_children_finish)   (GFile                *file,
204                                                        GAsyncResult         *res,
205                                                        GError              **error);
206 
207   GFileInfo *         (* query_info)                  (GFile                *file,
208                                                        const char           *attributes,
209                                                        GFileQueryInfoFlags   flags,
210                                                        GCancellable         *cancellable,
211                                                        GError              **error);
212   void                (* query_info_async)            (GFile                *file,
213                                                        const char           *attributes,
214                                                        GFileQueryInfoFlags   flags,
215                                                        int                   io_priority,
216                                                        GCancellable         *cancellable,
217                                                        GAsyncReadyCallback   callback,
218                                                        gpointer              user_data);
219   GFileInfo *         (* query_info_finish)           (GFile                *file,
220                                                        GAsyncResult         *res,
221                                                        GError              **error);
222 
223   GFileInfo *         (* query_filesystem_info)       (GFile                *file,
224                                                        const char           *attributes,
225                                                        GCancellable         *cancellable,
226                                                        GError              **error);
227   void                (* query_filesystem_info_async) (GFile                *file,
228                                                        const char           *attributes,
229                                                        int                   io_priority,
230                                                        GCancellable         *cancellable,
231                                                        GAsyncReadyCallback   callback,
232                                                        gpointer              user_data);
233   GFileInfo *         (* query_filesystem_info_finish)(GFile                *file,
234                                                        GAsyncResult         *res,
235                                                        GError              **error);
236 
237   GMount *            (* find_enclosing_mount)        (GFile                *file,
238                                                        GCancellable         *cancellable,
239                                                        GError              **error);
240   void                (* find_enclosing_mount_async)  (GFile                *file,
241                                                        int                   io_priority,
242                                                        GCancellable         *cancellable,
243                                                        GAsyncReadyCallback   callback,
244                                                        gpointer              user_data);
245   GMount *            (* find_enclosing_mount_finish) (GFile                *file,
246                                                        GAsyncResult         *res,
247                                                        GError              **error);
248 
249   GFile *             (* set_display_name)            (GFile                *file,
250                                                        const char           *display_name,
251                                                        GCancellable         *cancellable,
252                                                        GError              **error);
253   void                (* set_display_name_async)      (GFile                *file,
254                                                        const char           *display_name,
255                                                        int                   io_priority,
256                                                        GCancellable         *cancellable,
257                                                        GAsyncReadyCallback   callback,
258                                                        gpointer              user_data);
259   GFile *             (* set_display_name_finish)     (GFile                *file,
260                                                        GAsyncResult         *res,
261                                                        GError              **error);
262 
263   GFileAttributeInfoList * (* query_settable_attributes)    (GFile          *file,
264                                                              GCancellable   *cancellable,
265                                                              GError        **error);
266   void                (* _query_settable_attributes_async)  (void);
267   void                (* _query_settable_attributes_finish) (void);
268 
269   GFileAttributeInfoList * (* query_writable_namespaces)    (GFile          *file,
270                                                              GCancellable   *cancellable,
271                                                              GError        **error);
272   void                (* _query_writable_namespaces_async)  (void);
273   void                (* _query_writable_namespaces_finish) (void);
274 
275   gboolean            (* set_attribute)               (GFile                *file,
276                                                        const char           *attribute,
277                                                        GFileAttributeType    type,
278                                                        gpointer              value_p,
279                                                        GFileQueryInfoFlags   flags,
280                                                        GCancellable         *cancellable,
281                                                        GError              **error);
282   gboolean            (* set_attributes_from_info)    (GFile                *file,
283                                                        GFileInfo            *info,
284                                                        GFileQueryInfoFlags   flags,
285                                                        GCancellable         *cancellable,
286                                                        GError              **error);
287   void                (* set_attributes_async)        (GFile                *file,
288                                                        GFileInfo            *info,
289                                                        GFileQueryInfoFlags   flags,
290                                                        int                   io_priority,
291                                                        GCancellable         *cancellable,
292                                                        GAsyncReadyCallback   callback,
293                                                        gpointer              user_data);
294   gboolean            (* set_attributes_finish)       (GFile                *file,
295                                                        GAsyncResult         *result,
296                                                        GFileInfo           **info,
297                                                        GError              **error);
298 
299   GFileInputStream *  (* read_fn)                     (GFile                *file,
300                                                        GCancellable         *cancellable,
301                                                        GError              **error);
302   void                (* read_async)                  (GFile                *file,
303                                                        int                   io_priority,
304                                                        GCancellable         *cancellable,
305                                                        GAsyncReadyCallback   callback,
306                                                        gpointer              user_data);
307   GFileInputStream *  (* read_finish)                 (GFile                *file,
308                                                        GAsyncResult         *res,
309                                                        GError              **error);
310 
311   GFileOutputStream * (* append_to)                   (GFile                *file,
312                                                        GFileCreateFlags      flags,
313                                                        GCancellable         *cancellable,
314                                                        GError              **error);
315   void                (* append_to_async)             (GFile                *file,
316                                                        GFileCreateFlags      flags,
317                                                        int                   io_priority,
318                                                        GCancellable         *cancellable,
319                                                        GAsyncReadyCallback   callback,
320                                                        gpointer              user_data);
321   GFileOutputStream * (* append_to_finish)            (GFile                *file,
322                                                        GAsyncResult         *res,
323                                                        GError              **error);
324 
325   GFileOutputStream * (* create)                      (GFile                *file,
326                                                        GFileCreateFlags      flags,
327                                                        GCancellable         *cancellable,
328                                                        GError              **error);
329   void                (* create_async)                (GFile                *file,
330                                                        GFileCreateFlags      flags,
331                                                        int                   io_priority,
332                                                        GCancellable         *cancellable,
333                                                        GAsyncReadyCallback   callback,
334                                                        gpointer              user_data);
335   GFileOutputStream * (* create_finish)               (GFile                *file,
336                                                        GAsyncResult         *res,
337                                                        GError              **error);
338 
339   GFileOutputStream * (* replace)                     (GFile                *file,
340                                                        const char           *etag,
341                                                        gboolean              make_backup,
342                                                        GFileCreateFlags      flags,
343                                                        GCancellable         *cancellable,
344                                                        GError              **error);
345   void                (* replace_async)               (GFile                *file,
346                                                        const char           *etag,
347                                                        gboolean              make_backup,
348                                                        GFileCreateFlags      flags,
349                                                        int                   io_priority,
350                                                        GCancellable         *cancellable,
351                                                        GAsyncReadyCallback   callback,
352                                                        gpointer              user_data);
353   GFileOutputStream * (* replace_finish)              (GFile                *file,
354                                                        GAsyncResult         *res,
355                                                        GError              **error);
356 
357   gboolean            (* delete_file)                 (GFile                *file,
358                                                        GCancellable         *cancellable,
359                                                        GError              **error);
360   void                (* delete_file_async)           (GFile                *file,
361 						       int                   io_priority,
362 						       GCancellable         *cancellable,
363 						       GAsyncReadyCallback   callback,
364 						       gpointer              user_data);
365   gboolean            (* delete_file_finish)          (GFile                *file,
366 						       GAsyncResult         *result,
367 						       GError              **error);
368 
369   gboolean            (* trash)                       (GFile                *file,
370                                                        GCancellable         *cancellable,
371                                                        GError              **error);
372   void                (* trash_async)                 (GFile                *file,
373 						       int                   io_priority,
374 						       GCancellable         *cancellable,
375 						       GAsyncReadyCallback   callback,
376 						       gpointer              user_data);
377   gboolean            (* trash_finish)                (GFile                *file,
378 						       GAsyncResult         *result,
379 						       GError              **error);
380 
381   gboolean            (* make_directory)              (GFile                *file,
382                                                        GCancellable         *cancellable,
383                                                        GError              **error);
384   void                (* make_directory_async)        (GFile                *file,
385                                                        int                   io_priority,
386                                                        GCancellable         *cancellable,
387                                                        GAsyncReadyCallback   callback,
388                                                        gpointer              user_data);
389   gboolean            (* make_directory_finish)       (GFile                *file,
390                                                        GAsyncResult         *result,
391                                                        GError              **error);
392 
393   gboolean            (* make_symbolic_link)          (GFile                *file,
394                                                        const char           *symlink_value,
395                                                        GCancellable         *cancellable,
396                                                        GError              **error);
397   void                (* _make_symbolic_link_async)   (void);
398   void                (* _make_symbolic_link_finish)  (void);
399 
400   gboolean            (* copy)                        (GFile                *source,
401                                                        GFile                *destination,
402                                                        GFileCopyFlags        flags,
403                                                        GCancellable         *cancellable,
404                                                        GFileProgressCallback progress_callback,
405                                                        gpointer              progress_callback_data,
406                                                        GError              **error);
407   void                (* copy_async)                  (GFile                *source,
408                                                        GFile                *destination,
409                                                        GFileCopyFlags        flags,
410                                                        int                   io_priority,
411                                                        GCancellable         *cancellable,
412                                                        GFileProgressCallback progress_callback,
413                                                        gpointer              progress_callback_data,
414                                                        GAsyncReadyCallback   callback,
415                                                        gpointer              user_data);
416   gboolean            (* copy_finish)                 (GFile                *file,
417                                                        GAsyncResult         *res,
418                                                        GError              **error);
419 
420   gboolean            (* move)                        (GFile                *source,
421                                                        GFile                *destination,
422                                                        GFileCopyFlags        flags,
423                                                        GCancellable         *cancellable,
424                                                        GFileProgressCallback progress_callback,
425                                                        gpointer              progress_callback_data,
426                                                        GError              **error);
427   void                (* _move_async)                 (void);
428   void                (* _move_finish)                (void);
429 
430   void                (* mount_mountable)             (GFile                *file,
431                                                        GMountMountFlags      flags,
432                                                        GMountOperation      *mount_operation,
433                                                        GCancellable         *cancellable,
434                                                        GAsyncReadyCallback   callback,
435                                                        gpointer              user_data);
436   GFile *             (* mount_mountable_finish)      (GFile                *file,
437                                                        GAsyncResult         *result,
438                                                        GError              **error);
439 
440   void                (* unmount_mountable)           (GFile                *file,
441                                                        GMountUnmountFlags    flags,
442                                                        GCancellable         *cancellable,
443                                                        GAsyncReadyCallback   callback,
444                                                        gpointer              user_data);
445   gboolean            (* unmount_mountable_finish)    (GFile                *file,
446                                                        GAsyncResult         *result,
447                                                        GError              **error);
448 
449   void                (* eject_mountable)             (GFile                *file,
450                                                        GMountUnmountFlags    flags,
451                                                        GCancellable         *cancellable,
452                                                        GAsyncReadyCallback   callback,
453                                                        gpointer              user_data);
454   gboolean            (* eject_mountable_finish)      (GFile                *file,
455                                                        GAsyncResult         *result,
456                                                        GError              **error);
457 
458   void                (* mount_enclosing_volume)      (GFile                *location,
459                                                        GMountMountFlags      flags,
460                                                        GMountOperation      *mount_operation,
461                                                        GCancellable         *cancellable,
462                                                        GAsyncReadyCallback   callback,
463                                                        gpointer              user_data);
464   gboolean         (* mount_enclosing_volume_finish)  (GFile                *location,
465                                                        GAsyncResult         *result,
466                                                        GError              **error);
467 
468   GFileMonitor *      (* monitor_dir)                 (GFile                *file,
469                                                        GFileMonitorFlags     flags,
470                                                        GCancellable         *cancellable,
471                                                        GError              **error);
472   GFileMonitor *      (* monitor_file)                (GFile                *file,
473                                                        GFileMonitorFlags     flags,
474                                                        GCancellable         *cancellable,
475                                                        GError              **error);
476 
477   GFileIOStream *     (* open_readwrite)              (GFile                *file,
478                                                        GCancellable         *cancellable,
479                                                        GError              **error);
480   void                (* open_readwrite_async)        (GFile                *file,
481                                                        int                   io_priority,
482                                                        GCancellable         *cancellable,
483                                                        GAsyncReadyCallback   callback,
484                                                        gpointer              user_data);
485   GFileIOStream *     (* open_readwrite_finish)       (GFile                *file,
486                                                        GAsyncResult         *res,
487                                                        GError              **error);
488   GFileIOStream *     (* create_readwrite)            (GFile                *file,
489 						       GFileCreateFlags      flags,
490                                                        GCancellable         *cancellable,
491                                                        GError              **error);
492   void                (* create_readwrite_async)      (GFile                *file,
493 						       GFileCreateFlags      flags,
494                                                        int                   io_priority,
495                                                        GCancellable         *cancellable,
496                                                        GAsyncReadyCallback   callback,
497                                                        gpointer              user_data);
498   GFileIOStream *     (* create_readwrite_finish)      (GFile                *file,
499                                                        GAsyncResult         *res,
500                                                        GError              **error);
501   GFileIOStream *     (* replace_readwrite)           (GFile                *file,
502                                                        const char           *etag,
503                                                        gboolean              make_backup,
504                                                        GFileCreateFlags      flags,
505                                                        GCancellable         *cancellable,
506                                                        GError              **error);
507   void                (* replace_readwrite_async)     (GFile                *file,
508                                                        const char           *etag,
509                                                        gboolean              make_backup,
510                                                        GFileCreateFlags      flags,
511                                                        int                   io_priority,
512                                                        GCancellable         *cancellable,
513                                                        GAsyncReadyCallback   callback,
514                                                        gpointer              user_data);
515   GFileIOStream *     (* replace_readwrite_finish)    (GFile                *file,
516                                                        GAsyncResult         *res,
517                                                        GError              **error);
518 
519   void                (* start_mountable)             (GFile                *file,
520                                                        GDriveStartFlags      flags,
521                                                        GMountOperation      *start_operation,
522                                                        GCancellable         *cancellable,
523                                                        GAsyncReadyCallback   callback,
524                                                        gpointer              user_data);
525   gboolean            (* start_mountable_finish)      (GFile                *file,
526                                                        GAsyncResult         *result,
527                                                        GError              **error);
528 
529   void                (* stop_mountable)              (GFile                *file,
530                                                        GMountUnmountFlags    flags,
531                                                        GMountOperation      *mount_operation,
532                                                        GCancellable         *cancellable,
533                                                        GAsyncReadyCallback   callback,
534                                                        gpointer              user_data);
535   gboolean            (* stop_mountable_finish)       (GFile                *file,
536                                                        GAsyncResult         *result,
537                                                        GError              **error);
538 
539   gboolean            supports_thread_contexts;
540 
541   void                (* unmount_mountable_with_operation) (GFile           *file,
542                                                        GMountUnmountFlags    flags,
543                                                        GMountOperation      *mount_operation,
544                                                        GCancellable         *cancellable,
545                                                        GAsyncReadyCallback   callback,
546                                                        gpointer              user_data);
547   gboolean            (* unmount_mountable_with_operation_finish) (GFile    *file,
548                                                        GAsyncResult         *result,
549                                                        GError              **error);
550 
551   void                (* eject_mountable_with_operation) (GFile             *file,
552                                                        GMountUnmountFlags    flags,
553                                                        GMountOperation      *mount_operation,
554                                                        GCancellable         *cancellable,
555                                                        GAsyncReadyCallback   callback,
556                                                        gpointer              user_data);
557   gboolean            (* eject_mountable_with_operation_finish) (GFile      *file,
558                                                        GAsyncResult         *result,
559                                                        GError              **error);
560 
561   void                (* poll_mountable)              (GFile                *file,
562                                                        GCancellable         *cancellable,
563                                                        GAsyncReadyCallback   callback,
564                                                        gpointer              user_data);
565   gboolean            (* poll_mountable_finish)       (GFile                *file,
566                                                        GAsyncResult         *result,
567                                                        GError              **error);
568 
569   gboolean            (* measure_disk_usage)          (GFile                         *file,
570                                                        GFileMeasureFlags              flags,
571                                                        GCancellable                  *cancellable,
572                                                        GFileMeasureProgressCallback   progress_callback,
573                                                        gpointer                       progress_data,
574                                                        guint64                       *disk_usage,
575                                                        guint64                       *num_dirs,
576                                                        guint64                       *num_files,
577                                                        GError                       **error);
578   void                (* measure_disk_usage_async)    (GFile                         *file,
579                                                        GFileMeasureFlags              flags,
580                                                        gint                           io_priority,
581                                                        GCancellable                  *cancellable,
582                                                        GFileMeasureProgressCallback   progress_callback,
583                                                        gpointer                       progress_data,
584                                                        GAsyncReadyCallback            callback,
585                                                        gpointer                       user_data);
586   gboolean            (* measure_disk_usage_finish)   (GFile                         *file,
587                                                        GAsyncResult                  *result,
588                                                        guint64                       *disk_usage,
589                                                        guint64                       *num_dirs,
590                                                        guint64                       *num_files,
591                                                        GError                       **error);
592 };
593 
594 GLIB_AVAILABLE_IN_ALL
595 GType                   g_file_get_type                   (void) G_GNUC_CONST;
596 
597 GLIB_AVAILABLE_IN_ALL
598 GFile *                 g_file_new_for_path               (const char                 *path);
599 GLIB_AVAILABLE_IN_ALL
600 GFile *                 g_file_new_for_uri                (const char                 *uri);
601 GLIB_AVAILABLE_IN_ALL
602 GFile *                 g_file_new_for_commandline_arg    (const char                 *arg);
603 GLIB_AVAILABLE_IN_2_36
604 GFile *                 g_file_new_for_commandline_arg_and_cwd (const gchar           *arg,
605                                                                 const gchar           *cwd);
606 GLIB_AVAILABLE_IN_2_32
607 GFile *                 g_file_new_tmp                    (const char                 *tmpl,
608                                                            GFileIOStream             **iostream,
609                                                            GError                    **error);
610 GLIB_AVAILABLE_IN_ALL
611 GFile *                 g_file_parse_name                 (const char                 *parse_name);
612 GLIB_AVAILABLE_IN_2_56
613 GFile *                 g_file_new_build_filename         (const gchar                *first_element,
614                                                            ...) G_GNUC_NULL_TERMINATED;
615 GLIB_AVAILABLE_IN_ALL
616 GFile *                 g_file_dup                        (GFile                      *file);
617 GLIB_AVAILABLE_IN_ALL
618 guint                   g_file_hash                       (gconstpointer               file);
619 GLIB_AVAILABLE_IN_ALL
620 gboolean                g_file_equal                      (GFile                      *file1,
621 							   GFile                      *file2);
622 GLIB_AVAILABLE_IN_ALL
623 char *                  g_file_get_basename               (GFile                      *file);
624 GLIB_AVAILABLE_IN_ALL
625 char *                  g_file_get_path                   (GFile                      *file);
626 GLIB_AVAILABLE_IN_2_56
627 const char *            g_file_peek_path                  (GFile                      *file);
628 GLIB_AVAILABLE_IN_ALL
629 char *                  g_file_get_uri                    (GFile                      *file);
630 GLIB_AVAILABLE_IN_ALL
631 char *                  g_file_get_parse_name             (GFile                      *file);
632 GLIB_AVAILABLE_IN_ALL
633 GFile *                 g_file_get_parent                 (GFile                      *file);
634 GLIB_AVAILABLE_IN_ALL
635 gboolean                g_file_has_parent                 (GFile                      *file,
636                                                            GFile                      *parent);
637 GLIB_AVAILABLE_IN_ALL
638 GFile *                 g_file_get_child                  (GFile                      *file,
639 							   const char                 *name);
640 GLIB_AVAILABLE_IN_ALL
641 GFile *                 g_file_get_child_for_display_name (GFile                      *file,
642 							   const char                 *display_name,
643 							   GError                    **error);
644 GLIB_AVAILABLE_IN_ALL
645 gboolean                g_file_has_prefix                 (GFile                      *file,
646 							   GFile                      *prefix);
647 GLIB_AVAILABLE_IN_ALL
648 char *                  g_file_get_relative_path          (GFile                      *parent,
649 							   GFile                      *descendant);
650 GLIB_AVAILABLE_IN_ALL
651 GFile *                 g_file_resolve_relative_path      (GFile                      *file,
652 							   const char                 *relative_path);
653 GLIB_AVAILABLE_IN_ALL
654 gboolean                g_file_is_native                  (GFile                      *file);
655 GLIB_AVAILABLE_IN_ALL
656 gboolean                g_file_has_uri_scheme             (GFile                      *file,
657 							   const char                 *uri_scheme);
658 GLIB_AVAILABLE_IN_ALL
659 char *                  g_file_get_uri_scheme             (GFile                      *file);
660 GLIB_AVAILABLE_IN_ALL
661 GFileInputStream *      g_file_read                       (GFile                      *file,
662 							   GCancellable               *cancellable,
663 							   GError                    **error);
664 GLIB_AVAILABLE_IN_ALL
665 void                    g_file_read_async                 (GFile                      *file,
666 							   int                         io_priority,
667 							   GCancellable               *cancellable,
668 							   GAsyncReadyCallback         callback,
669 							   gpointer                    user_data);
670 GLIB_AVAILABLE_IN_ALL
671 GFileInputStream *      g_file_read_finish                (GFile                      *file,
672 							   GAsyncResult               *res,
673 							   GError                    **error);
674 GLIB_AVAILABLE_IN_ALL
675 GFileOutputStream *     g_file_append_to                  (GFile                      *file,
676 							   GFileCreateFlags             flags,
677 							   GCancellable               *cancellable,
678 							   GError                    **error);
679 GLIB_AVAILABLE_IN_ALL
680 GFileOutputStream *     g_file_create                     (GFile                      *file,
681 							   GFileCreateFlags             flags,
682 							   GCancellable               *cancellable,
683 							   GError                    **error);
684 GLIB_AVAILABLE_IN_ALL
685 GFileOutputStream *     g_file_replace                    (GFile                      *file,
686 							   const char                 *etag,
687 							   gboolean                    make_backup,
688 							   GFileCreateFlags            flags,
689 							   GCancellable               *cancellable,
690 							   GError                    **error);
691 GLIB_AVAILABLE_IN_ALL
692 void                    g_file_append_to_async            (GFile                      *file,
693 							   GFileCreateFlags            flags,
694 							   int                         io_priority,
695 							   GCancellable               *cancellable,
696 							   GAsyncReadyCallback         callback,
697 							   gpointer                    user_data);
698 GLIB_AVAILABLE_IN_ALL
699 GFileOutputStream *     g_file_append_to_finish           (GFile                      *file,
700 							   GAsyncResult               *res,
701 							   GError                    **error);
702 GLIB_AVAILABLE_IN_ALL
703 void                    g_file_create_async               (GFile                      *file,
704 							   GFileCreateFlags            flags,
705 							   int                         io_priority,
706 							   GCancellable               *cancellable,
707 							   GAsyncReadyCallback         callback,
708 							   gpointer                    user_data);
709 GLIB_AVAILABLE_IN_ALL
710 GFileOutputStream *     g_file_create_finish              (GFile                      *file,
711 							   GAsyncResult               *res,
712 							   GError                    **error);
713 GLIB_AVAILABLE_IN_ALL
714 void                    g_file_replace_async              (GFile                      *file,
715 							   const char                 *etag,
716 							   gboolean                    make_backup,
717 							   GFileCreateFlags            flags,
718 							   int                         io_priority,
719 							   GCancellable               *cancellable,
720 							   GAsyncReadyCallback         callback,
721 							   gpointer                    user_data);
722 GLIB_AVAILABLE_IN_ALL
723 GFileOutputStream *     g_file_replace_finish             (GFile                      *file,
724 							   GAsyncResult               *res,
725 							   GError                    **error);
726 GLIB_AVAILABLE_IN_ALL
727 GFileIOStream *         g_file_open_readwrite             (GFile                      *file,
728 							   GCancellable               *cancellable,
729 							   GError                    **error);
730 GLIB_AVAILABLE_IN_ALL
731 void                    g_file_open_readwrite_async       (GFile                      *file,
732 							   int                         io_priority,
733 							   GCancellable               *cancellable,
734 							   GAsyncReadyCallback         callback,
735 							   gpointer                    user_data);
736 GLIB_AVAILABLE_IN_ALL
737 GFileIOStream *         g_file_open_readwrite_finish      (GFile                      *file,
738 							   GAsyncResult               *res,
739 							   GError                    **error);
740 GLIB_AVAILABLE_IN_ALL
741 GFileIOStream *         g_file_create_readwrite           (GFile                      *file,
742 							   GFileCreateFlags            flags,
743 							   GCancellable               *cancellable,
744 							   GError                    **error);
745 GLIB_AVAILABLE_IN_ALL
746 void                    g_file_create_readwrite_async     (GFile                      *file,
747 							   GFileCreateFlags            flags,
748 							   int                         io_priority,
749 							   GCancellable               *cancellable,
750 							   GAsyncReadyCallback         callback,
751 							   gpointer                    user_data);
752 GLIB_AVAILABLE_IN_ALL
753 GFileIOStream *         g_file_create_readwrite_finish    (GFile                      *file,
754 							   GAsyncResult               *res,
755 							   GError                    **error);
756 GLIB_AVAILABLE_IN_ALL
757 GFileIOStream *         g_file_replace_readwrite          (GFile                      *file,
758 							   const char                 *etag,
759 							   gboolean                    make_backup,
760 							   GFileCreateFlags            flags,
761 							   GCancellable               *cancellable,
762 							   GError                    **error);
763 GLIB_AVAILABLE_IN_ALL
764 void                    g_file_replace_readwrite_async    (GFile                      *file,
765 							   const char                 *etag,
766 							   gboolean                    make_backup,
767 							   GFileCreateFlags            flags,
768 							   int                         io_priority,
769 							   GCancellable               *cancellable,
770 							   GAsyncReadyCallback         callback,
771 							   gpointer                    user_data);
772 GLIB_AVAILABLE_IN_ALL
773 GFileIOStream *         g_file_replace_readwrite_finish   (GFile                      *file,
774 							   GAsyncResult               *res,
775 							   GError                    **error);
776 GLIB_AVAILABLE_IN_ALL
777 gboolean                g_file_query_exists               (GFile                      *file,
778 							   GCancellable               *cancellable);
779 GLIB_AVAILABLE_IN_ALL
780 GFileType               g_file_query_file_type            (GFile                      *file,
781                                                            GFileQueryInfoFlags         flags,
782                                                            GCancellable               *cancellable);
783 GLIB_AVAILABLE_IN_ALL
784 GFileInfo *             g_file_query_info                 (GFile                      *file,
785 							   const char                 *attributes,
786 							   GFileQueryInfoFlags         flags,
787 							   GCancellable               *cancellable,
788 							   GError                    **error);
789 GLIB_AVAILABLE_IN_ALL
790 void                    g_file_query_info_async           (GFile                      *file,
791 							   const char                 *attributes,
792 							   GFileQueryInfoFlags         flags,
793 							   int                         io_priority,
794 							   GCancellable               *cancellable,
795 							   GAsyncReadyCallback         callback,
796 							   gpointer                    user_data);
797 GLIB_AVAILABLE_IN_ALL
798 GFileInfo *             g_file_query_info_finish          (GFile                      *file,
799 							   GAsyncResult               *res,
800 							   GError                    **error);
801 GLIB_AVAILABLE_IN_ALL
802 GFileInfo *             g_file_query_filesystem_info      (GFile                      *file,
803 							   const char                 *attributes,
804 							   GCancellable               *cancellable,
805 							   GError                    **error);
806 GLIB_AVAILABLE_IN_ALL
807 void                    g_file_query_filesystem_info_async (GFile                      *file,
808 							   const char                 *attributes,
809 							   int                         io_priority,
810 							   GCancellable               *cancellable,
811 							   GAsyncReadyCallback         callback,
812 							   gpointer                    user_data);
813 GLIB_AVAILABLE_IN_ALL
814 GFileInfo *             g_file_query_filesystem_info_finish (GFile                      *file,
815                                                            GAsyncResult               *res,
816 							   GError                    **error);
817 GLIB_AVAILABLE_IN_ALL
818 GMount *                g_file_find_enclosing_mount       (GFile                      *file,
819                                                            GCancellable               *cancellable,
820                                                            GError                    **error);
821 GLIB_AVAILABLE_IN_ALL
822 void                    g_file_find_enclosing_mount_async (GFile                      *file,
823 							   int                         io_priority,
824 							   GCancellable               *cancellable,
825 							   GAsyncReadyCallback         callback,
826 							   gpointer                    user_data);
827 GLIB_AVAILABLE_IN_ALL
828 GMount *                g_file_find_enclosing_mount_finish (GFile                     *file,
829 							    GAsyncResult              *res,
830 							    GError                   **error);
831 GLIB_AVAILABLE_IN_ALL
832 GFileEnumerator *       g_file_enumerate_children         (GFile                      *file,
833 							   const char                 *attributes,
834 							   GFileQueryInfoFlags         flags,
835 							   GCancellable               *cancellable,
836 							   GError                    **error);
837 GLIB_AVAILABLE_IN_ALL
838 void                    g_file_enumerate_children_async   (GFile                      *file,
839 							   const char                 *attributes,
840 							   GFileQueryInfoFlags         flags,
841 							   int                         io_priority,
842 							   GCancellable               *cancellable,
843 							   GAsyncReadyCallback         callback,
844 							   gpointer                    user_data);
845 GLIB_AVAILABLE_IN_ALL
846 GFileEnumerator *       g_file_enumerate_children_finish  (GFile                      *file,
847 							   GAsyncResult               *res,
848 							   GError                    **error);
849 GLIB_AVAILABLE_IN_ALL
850 GFile *                 g_file_set_display_name           (GFile                      *file,
851 							   const char                 *display_name,
852 							   GCancellable               *cancellable,
853 							   GError                    **error);
854 GLIB_AVAILABLE_IN_ALL
855 void                    g_file_set_display_name_async     (GFile                      *file,
856 							   const char                 *display_name,
857 							   int                         io_priority,
858 							   GCancellable               *cancellable,
859 							   GAsyncReadyCallback         callback,
860 							   gpointer                    user_data);
861 GLIB_AVAILABLE_IN_ALL
862 GFile *                 g_file_set_display_name_finish    (GFile                      *file,
863 							   GAsyncResult               *res,
864 							   GError                    **error);
865 GLIB_AVAILABLE_IN_ALL
866 gboolean                g_file_delete                     (GFile                      *file,
867 							   GCancellable               *cancellable,
868 							   GError                    **error);
869 
870 GLIB_AVAILABLE_IN_2_34
871 void                    g_file_delete_async               (GFile                      *file,
872 							   int                         io_priority,
873 							   GCancellable               *cancellable,
874 							   GAsyncReadyCallback         callback,
875 							   gpointer                    user_data);
876 
877 GLIB_AVAILABLE_IN_2_34
878 gboolean                g_file_delete_finish              (GFile                      *file,
879 							   GAsyncResult               *result,
880 							   GError                    **error);
881 
882 GLIB_AVAILABLE_IN_ALL
883 gboolean                g_file_trash                      (GFile                      *file,
884 							   GCancellable               *cancellable,
885 							   GError                    **error);
886 
887 GLIB_AVAILABLE_IN_2_38
888 void                    g_file_trash_async                (GFile                      *file,
889 							   int                         io_priority,
890 							   GCancellable               *cancellable,
891 							   GAsyncReadyCallback         callback,
892 							   gpointer                    user_data);
893 
894 GLIB_AVAILABLE_IN_2_38
895 gboolean                g_file_trash_finish               (GFile                      *file,
896 							   GAsyncResult               *result,
897 							   GError                    **error);
898 
899 GLIB_AVAILABLE_IN_ALL
900 gboolean                g_file_copy                       (GFile                      *source,
901 							   GFile                      *destination,
902 							   GFileCopyFlags              flags,
903 							   GCancellable               *cancellable,
904 							   GFileProgressCallback       progress_callback,
905 							   gpointer                    progress_callback_data,
906 							   GError                    **error);
907 GLIB_AVAILABLE_IN_ALL
908 void                    g_file_copy_async                 (GFile                      *source,
909 							   GFile                      *destination,
910 							   GFileCopyFlags              flags,
911 							   int                         io_priority,
912 							   GCancellable               *cancellable,
913 							   GFileProgressCallback       progress_callback,
914 							   gpointer                    progress_callback_data,
915 							   GAsyncReadyCallback         callback,
916 							   gpointer                    user_data);
917 GLIB_AVAILABLE_IN_ALL
918 gboolean                g_file_copy_finish                (GFile                      *file,
919 							   GAsyncResult               *res,
920 							   GError                    **error);
921 GLIB_AVAILABLE_IN_ALL
922 gboolean                g_file_move                       (GFile                      *source,
923 							   GFile                      *destination,
924 							   GFileCopyFlags              flags,
925 							   GCancellable               *cancellable,
926 							   GFileProgressCallback       progress_callback,
927 							   gpointer                    progress_callback_data,
928 							   GError                    **error);
929 GLIB_AVAILABLE_IN_ALL
930 gboolean                g_file_make_directory             (GFile                      *file,
931 							   GCancellable               *cancellable,
932 							   GError                    **error);
933 GLIB_AVAILABLE_IN_2_38
934 void                    g_file_make_directory_async       (GFile                      *file,
935                                                            int                         io_priority,
936                                                            GCancellable               *cancellable,
937                                                            GAsyncReadyCallback         callback,
938                                                            gpointer                    user_data);
939 GLIB_AVAILABLE_IN_2_38
940 gboolean                g_file_make_directory_finish      (GFile                      *file,
941                                                            GAsyncResult               *result,
942                                                            GError                    **error);
943 
944 GLIB_AVAILABLE_IN_ALL
945 gboolean                g_file_make_directory_with_parents (GFile                     *file,
946 		                                           GCancellable               *cancellable,
947 		                                           GError                    **error);
948 GLIB_AVAILABLE_IN_ALL
949 gboolean                g_file_make_symbolic_link         (GFile                      *file,
950 							   const char                 *symlink_value,
951 							   GCancellable               *cancellable,
952 							   GError                    **error);
953 GLIB_AVAILABLE_IN_ALL
954 GFileAttributeInfoList *g_file_query_settable_attributes  (GFile                      *file,
955 							   GCancellable               *cancellable,
956 							   GError                    **error);
957 GLIB_AVAILABLE_IN_ALL
958 GFileAttributeInfoList *g_file_query_writable_namespaces  (GFile                      *file,
959 							   GCancellable               *cancellable,
960 							   GError                    **error);
961 GLIB_AVAILABLE_IN_ALL
962 gboolean                g_file_set_attribute              (GFile                      *file,
963 							   const char                 *attribute,
964 							   GFileAttributeType          type,
965 							   gpointer                    value_p,
966 							   GFileQueryInfoFlags         flags,
967 							   GCancellable               *cancellable,
968 							   GError                    **error);
969 GLIB_AVAILABLE_IN_ALL
970 gboolean                g_file_set_attributes_from_info   (GFile                      *file,
971 							   GFileInfo                  *info,
972 							   GFileQueryInfoFlags         flags,
973 							   GCancellable               *cancellable,
974 							   GError                    **error);
975 GLIB_AVAILABLE_IN_ALL
976 void                    g_file_set_attributes_async       (GFile                      *file,
977 							   GFileInfo                  *info,
978 							   GFileQueryInfoFlags         flags,
979 							   int                         io_priority,
980 							   GCancellable               *cancellable,
981 							   GAsyncReadyCallback         callback,
982 							   gpointer                    user_data);
983 GLIB_AVAILABLE_IN_ALL
984 gboolean                g_file_set_attributes_finish      (GFile                      *file,
985 							   GAsyncResult               *result,
986 							   GFileInfo                 **info,
987 							   GError                    **error);
988 GLIB_AVAILABLE_IN_ALL
989 gboolean                g_file_set_attribute_string       (GFile                      *file,
990 							   const char                 *attribute,
991 							   const char                 *value,
992 							   GFileQueryInfoFlags         flags,
993 							   GCancellable               *cancellable,
994 							   GError                    **error);
995 GLIB_AVAILABLE_IN_ALL
996 gboolean                g_file_set_attribute_byte_string  (GFile                      *file,
997 							   const char                 *attribute,
998 							   const char                 *value,
999 							   GFileQueryInfoFlags         flags,
1000 							   GCancellable               *cancellable,
1001 							   GError                    **error);
1002 GLIB_AVAILABLE_IN_ALL
1003 gboolean                g_file_set_attribute_uint32       (GFile                      *file,
1004 							   const char                 *attribute,
1005 							   guint32                     value,
1006 							   GFileQueryInfoFlags         flags,
1007 							   GCancellable               *cancellable,
1008 							   GError                    **error);
1009 GLIB_AVAILABLE_IN_ALL
1010 gboolean                g_file_set_attribute_int32        (GFile                      *file,
1011 							   const char                 *attribute,
1012 							   gint32                      value,
1013 							   GFileQueryInfoFlags         flags,
1014 							   GCancellable               *cancellable,
1015 							   GError                    **error);
1016 GLIB_AVAILABLE_IN_ALL
1017 gboolean                g_file_set_attribute_uint64       (GFile                      *file,
1018 							   const char                 *attribute,
1019 							   guint64                     value,
1020 							   GFileQueryInfoFlags         flags,
1021 							   GCancellable               *cancellable,
1022 							   GError                    **error);
1023 GLIB_AVAILABLE_IN_ALL
1024 gboolean                g_file_set_attribute_int64        (GFile                      *file,
1025 							   const char                 *attribute,
1026 							   gint64                      value,
1027 							   GFileQueryInfoFlags         flags,
1028 							   GCancellable               *cancellable,
1029 							   GError                    **error);
1030 GLIB_AVAILABLE_IN_ALL
1031 void                    g_file_mount_enclosing_volume     (GFile                      *location,
1032 							   GMountMountFlags            flags,
1033 							   GMountOperation            *mount_operation,
1034 							   GCancellable               *cancellable,
1035 							   GAsyncReadyCallback         callback,
1036 							   gpointer                    user_data);
1037 GLIB_AVAILABLE_IN_ALL
1038 gboolean                g_file_mount_enclosing_volume_finish (GFile                      *location,
1039 							   GAsyncResult               *result,
1040 							   GError                    **error);
1041 GLIB_AVAILABLE_IN_ALL
1042 void                    g_file_mount_mountable            (GFile                      *file,
1043 							   GMountMountFlags            flags,
1044 							   GMountOperation            *mount_operation,
1045 							   GCancellable               *cancellable,
1046 							   GAsyncReadyCallback         callback,
1047 							   gpointer                    user_data);
1048 GLIB_AVAILABLE_IN_ALL
1049 GFile *                 g_file_mount_mountable_finish     (GFile                      *file,
1050 							   GAsyncResult               *result,
1051 							   GError                    **error);
1052 GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation)
1053 void                    g_file_unmount_mountable          (GFile                      *file,
1054                                                            GMountUnmountFlags          flags,
1055                                                            GCancellable               *cancellable,
1056                                                            GAsyncReadyCallback         callback,
1057                                                            gpointer                    user_data);
1058 
1059 GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation_finish)
1060 gboolean                g_file_unmount_mountable_finish   (GFile                      *file,
1061                                                            GAsyncResult               *result,
1062                                                            GError                    **error);
1063 GLIB_AVAILABLE_IN_ALL
1064 void                    g_file_unmount_mountable_with_operation (GFile                *file,
1065 							   GMountUnmountFlags          flags,
1066 							   GMountOperation            *mount_operation,
1067 							   GCancellable               *cancellable,
1068 							   GAsyncReadyCallback         callback,
1069 							   gpointer                    user_data);
1070 GLIB_AVAILABLE_IN_ALL
1071 gboolean                g_file_unmount_mountable_with_operation_finish (GFile         *file,
1072 							   GAsyncResult               *result,
1073 							   GError                    **error);
1074 GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation)
1075 void                    g_file_eject_mountable            (GFile                      *file,
1076                                                            GMountUnmountFlags          flags,
1077                                                            GCancellable               *cancellable,
1078                                                            GAsyncReadyCallback         callback,
1079                                                            gpointer                    user_data);
1080 
1081 GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation_finish)
1082 gboolean                g_file_eject_mountable_finish     (GFile                      *file,
1083                                                            GAsyncResult               *result,
1084                                                            GError                    **error);
1085 GLIB_AVAILABLE_IN_ALL
1086 void                    g_file_eject_mountable_with_operation (GFile                  *file,
1087 							   GMountUnmountFlags          flags,
1088 							   GMountOperation            *mount_operation,
1089 							   GCancellable               *cancellable,
1090 							   GAsyncReadyCallback         callback,
1091 							   gpointer                    user_data);
1092 GLIB_AVAILABLE_IN_ALL
1093 gboolean                g_file_eject_mountable_with_operation_finish (GFile           *file,
1094 							   GAsyncResult               *result,
1095 							   GError                    **error);
1096 
1097 GLIB_AVAILABLE_IN_2_68
1098 char *			g_file_build_attribute_list_for_copy (GFile                   *file,
1099 							   GFileCopyFlags              flags,
1100 							   GCancellable               *cancellable,
1101 							   GError                    **error);
1102 
1103 GLIB_AVAILABLE_IN_ALL
1104 gboolean                g_file_copy_attributes            (GFile                      *source,
1105 							   GFile                      *destination,
1106 							   GFileCopyFlags              flags,
1107 							   GCancellable               *cancellable,
1108 							   GError                    **error);
1109 
1110 
1111 GLIB_AVAILABLE_IN_ALL
1112 GFileMonitor*           g_file_monitor_directory          (GFile                  *file,
1113 							   GFileMonitorFlags       flags,
1114 							   GCancellable           *cancellable,
1115 							   GError                **error);
1116 GLIB_AVAILABLE_IN_ALL
1117 GFileMonitor*           g_file_monitor_file               (GFile                  *file,
1118 							   GFileMonitorFlags       flags,
1119 							   GCancellable           *cancellable,
1120 							   GError                **error);
1121 GLIB_AVAILABLE_IN_ALL
1122 GFileMonitor*           g_file_monitor                    (GFile                  *file,
1123 							   GFileMonitorFlags       flags,
1124 							   GCancellable           *cancellable,
1125 							   GError                **error);
1126 
1127 GLIB_AVAILABLE_IN_2_38
1128 gboolean                g_file_measure_disk_usage         (GFile                         *file,
1129                                                            GFileMeasureFlags              flags,
1130                                                            GCancellable                  *cancellable,
1131                                                            GFileMeasureProgressCallback   progress_callback,
1132                                                            gpointer                       progress_data,
1133                                                            guint64                       *disk_usage,
1134                                                            guint64                       *num_dirs,
1135                                                            guint64                       *num_files,
1136                                                            GError                       **error);
1137 
1138 GLIB_AVAILABLE_IN_2_38
1139 void                    g_file_measure_disk_usage_async   (GFile                         *file,
1140                                                            GFileMeasureFlags              flags,
1141                                                            gint                           io_priority,
1142                                                            GCancellable                  *cancellable,
1143                                                            GFileMeasureProgressCallback   progress_callback,
1144                                                            gpointer                       progress_data,
1145                                                            GAsyncReadyCallback            callback,
1146                                                            gpointer                       user_data);
1147 
1148 GLIB_AVAILABLE_IN_2_38
1149 gboolean                g_file_measure_disk_usage_finish  (GFile                         *file,
1150                                                            GAsyncResult                  *result,
1151                                                            guint64                       *disk_usage,
1152                                                            guint64                       *num_dirs,
1153                                                            guint64                       *num_files,
1154                                                            GError                       **error);
1155 
1156 GLIB_AVAILABLE_IN_ALL
1157 void                    g_file_start_mountable            (GFile                      *file,
1158 							   GDriveStartFlags            flags,
1159 							   GMountOperation            *start_operation,
1160 							   GCancellable               *cancellable,
1161 							   GAsyncReadyCallback         callback,
1162 							   gpointer                    user_data);
1163 GLIB_AVAILABLE_IN_ALL
1164 gboolean                g_file_start_mountable_finish     (GFile                      *file,
1165 							   GAsyncResult               *result,
1166 							   GError                    **error);
1167 GLIB_AVAILABLE_IN_ALL
1168 void                    g_file_stop_mountable             (GFile                      *file,
1169 							   GMountUnmountFlags          flags,
1170                                                            GMountOperation            *mount_operation,
1171 							   GCancellable               *cancellable,
1172 							   GAsyncReadyCallback         callback,
1173 							   gpointer                    user_data);
1174 GLIB_AVAILABLE_IN_ALL
1175 gboolean                g_file_stop_mountable_finish      (GFile                      *file,
1176 							   GAsyncResult               *result,
1177 							   GError                    **error);
1178 
1179 GLIB_AVAILABLE_IN_ALL
1180 void                    g_file_poll_mountable             (GFile                      *file,
1181 							   GCancellable               *cancellable,
1182 							   GAsyncReadyCallback         callback,
1183 							   gpointer                    user_data);
1184 GLIB_AVAILABLE_IN_ALL
1185 gboolean                g_file_poll_mountable_finish      (GFile                      *file,
1186 							   GAsyncResult               *result,
1187 							   GError                    **error);
1188 
1189 /* Utilities */
1190 
1191 GLIB_AVAILABLE_IN_ALL
1192 GAppInfo *g_file_query_default_handler       (GFile                  *file,
1193 					      GCancellable           *cancellable,
1194 					      GError                **error);
1195 GLIB_AVAILABLE_IN_2_60
1196 void      g_file_query_default_handler_async (GFile                  *file,
1197                                               int                     io_priority,
1198                                               GCancellable           *cancellable,
1199                                               GAsyncReadyCallback     callback,
1200                                               gpointer                user_data);
1201 GLIB_AVAILABLE_IN_2_60
1202 GAppInfo *g_file_query_default_handler_finish (GFile                 *file,
1203                                                GAsyncResult          *result,
1204                                                GError               **error);
1205 
1206 GLIB_AVAILABLE_IN_ALL
1207 gboolean g_file_load_contents                (GFile                  *file,
1208 					      GCancellable           *cancellable,
1209 					      char                  **contents,
1210 					      gsize                  *length,
1211 					      char                  **etag_out,
1212 					      GError                **error);
1213 GLIB_AVAILABLE_IN_ALL
1214 void     g_file_load_contents_async          (GFile                  *file,
1215 					      GCancellable           *cancellable,
1216 					      GAsyncReadyCallback     callback,
1217 					      gpointer                user_data);
1218 GLIB_AVAILABLE_IN_ALL
1219 gboolean g_file_load_contents_finish         (GFile                  *file,
1220 					      GAsyncResult           *res,
1221 					      char                  **contents,
1222 					      gsize                  *length,
1223 					      char                  **etag_out,
1224 					      GError                **error);
1225 GLIB_AVAILABLE_IN_ALL
1226 void     g_file_load_partial_contents_async  (GFile                  *file,
1227 					      GCancellable           *cancellable,
1228 					      GFileReadMoreCallback   read_more_callback,
1229 					      GAsyncReadyCallback     callback,
1230 					      gpointer                user_data);
1231 GLIB_AVAILABLE_IN_ALL
1232 gboolean g_file_load_partial_contents_finish (GFile                  *file,
1233 					      GAsyncResult           *res,
1234 					      char                  **contents,
1235 					      gsize                  *length,
1236 					      char                  **etag_out,
1237 					      GError                **error);
1238 GLIB_AVAILABLE_IN_ALL
1239 gboolean g_file_replace_contents             (GFile                  *file,
1240 					      const char             *contents,
1241 					      gsize                   length,
1242 					      const char             *etag,
1243 					      gboolean                make_backup,
1244 					      GFileCreateFlags        flags,
1245 					      char                  **new_etag,
1246 					      GCancellable           *cancellable,
1247 					      GError                **error);
1248 GLIB_AVAILABLE_IN_ALL
1249 void     g_file_replace_contents_async       (GFile                  *file,
1250 					      const char             *contents,
1251 					      gsize                   length,
1252 					      const char             *etag,
1253 					      gboolean                make_backup,
1254 					      GFileCreateFlags        flags,
1255 					      GCancellable           *cancellable,
1256 					      GAsyncReadyCallback     callback,
1257 					      gpointer                user_data);
1258 GLIB_AVAILABLE_IN_2_40
1259 void     g_file_replace_contents_bytes_async (GFile                  *file,
1260 					      GBytes                 *contents,
1261 					      const char             *etag,
1262 					      gboolean                make_backup,
1263 					      GFileCreateFlags        flags,
1264 					      GCancellable           *cancellable,
1265 					      GAsyncReadyCallback     callback,
1266 					      gpointer                user_data);
1267 GLIB_AVAILABLE_IN_ALL
1268 gboolean g_file_replace_contents_finish      (GFile                  *file,
1269 					      GAsyncResult           *res,
1270 					      char                  **new_etag,
1271 					      GError                **error);
1272 
1273 GLIB_AVAILABLE_IN_ALL
1274 gboolean g_file_supports_thread_contexts     (GFile                  *file);
1275 
1276 GLIB_AVAILABLE_IN_2_56
1277 GBytes  *g_file_load_bytes                   (GFile                  *file,
1278                                               GCancellable           *cancellable,
1279                                               gchar                 **etag_out,
1280                                               GError                **error);
1281 GLIB_AVAILABLE_IN_2_56
1282 void     g_file_load_bytes_async             (GFile                  *file,
1283                                               GCancellable           *cancellable,
1284                                               GAsyncReadyCallback     callback,
1285                                               gpointer                user_data);
1286 GLIB_AVAILABLE_IN_2_56
1287 GBytes  *g_file_load_bytes_finish            (GFile                  *file,
1288                                               GAsyncResult           *result,
1289                                               gchar                 **etag_out,
1290                                               GError                **error);
1291 
1292 G_END_DECLS
1293 
1294 #endif /* __G_FILE_H__ */
1295