1 /* GIO - GLib Input, Output and Streaming Library
3 * Copyright (C) 2006-2007 Red Hat, Inc.
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 of the License, or (at your option) any later version.
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.
15 * You should have received a copy of the GNU Lesser General
16 * Public License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18 * Boston, MA 02111-1307, USA.
20 * Author: Alexander Larsson <alexl@redhat.com>
26 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
27 #error "Only <gio/gio.h> can be included directly."
30 #include <gio/giotypes.h>
34 #define G_TYPE_FILE (g_file_get_type ())
35 #define G_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE, GFile))
36 #define G_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE))
37 #define G_FILE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE, GFileIface))
43 * A handle to an object implementing the #GFileIface interface.
44 * Generally stores a location within the file system. Handles do not
45 * necessarily represent files or directories that currently exist.
47 typedef struct _GFile GFile; /* Dummy typedef */
49 typedef struct _GFileIface GFileIface;
54 * @g_iface: The parent interface.
55 * @dup: Duplicates a #GFile.
56 * @hash: Creates a hash of a #GFile.
57 * @equal: Checks equality of two given #GFile<!-- -->s.
58 * @is_native: Checks to see if a file is native to the system.
59 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
60 * @get_uri_scheme: Gets the URI scheme for a #GFile.
61 * @get_basename: Gets the basename for a given #GFile.
62 * @get_path: Gets the current path within a #GFile.
63 * @get_uri: Gets a URI for the path within a #GFile.
64 * @get_parse_name: Gets the parsed name for the #GFile.
65 * @get_parent: Gets the parent directory for the #GFile.
66 * @prefix_matches: Checks whether a #GFile contains a specified file.
67 * @get_relative_path: Gets the path for a #GFile relative to a given path.
68 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
69 * @get_child_for_display_name: Gets the child #GFile for a given display name.
70 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
71 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
72 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
73 * @query_info: Gets the #GFileInfo for a #GFile.
74 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
75 * @query_info_finish: Finishes an asynchronous query info operation.
76 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
77 * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
78 * @query_filesystem_info_finish: Finishes asynchronously getting the file system info.
79 * @find_enclosing_mount: Gets a #GMount for the #GFile.
80 * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
81 * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
82 * @set_display_name: Sets the display name for a #GFile.
83 * @set_display_name_async: Asynchronously sets a #GFile's display name.
84 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
85 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
86 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
87 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
88 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
89 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
90 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
91 * @set_attribute: Sets a #GFileAttribute.
92 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
93 * @set_attributes_async: Asynchronously sets a file's attributes.
94 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
95 * @read_fn: Reads a file asynchronously.
96 * @read_async: Asynchronously reads a file.
97 * @read_finish: Finishes asynchronously reading a file.
98 * @append_to: Writes to the end of a file.
99 * @append_to_async: Asynchronously writes to the end of a file.
100 * @append_to_finish: Finishes an asynchronous file append operation.
101 * @create: Creates a new file.
102 * @create_async: Asynchronously creates a file.
103 * @create_finish: Finishes asynchronously creating a file.
104 * @replace: Replaces the contents of a file.
105 * @replace_async: Asynchronously replaces the contents of a file.
106 * @replace_finish: Finishes asynchronously replacing a file.
107 * @delete_file: Deletes a file.
108 * @delete_file_async: Asynchronously deletes a file.
109 * @delete_file_finish: Finishes an asynchronous delete.
110 * @trash: Sends a #GFile to the Trash location.
111 * @trash_async: Asynchronously sends a #GFile to the Trash location.
112 * @trash_finish: Finishes an asynchronous file trashing operation.
113 * @make_directory: Makes a directory.
114 * @_make_directory_async: Asynchronously makes a directory.
115 * @_make_directory_finish: Finishes making a directory asynchronously.
116 * @make_symbolic_link: Makes a symbolic link.
117 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
118 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
119 * @copy: Copies a file.
120 * @copy_async: Asynchronously copies a file.
121 * @copy_finish: Finishes an asynchronous copy operation.
122 * @move: Moves a file.
123 * @_move_async: Asynchronously moves a file.
124 * @_move_finish: Finishes an asynchronous move operation.
125 * @mount_mountable: Mounts a mountable object.
126 * @mount_mountable_finish: Finishes a mounting operation.
127 * @unmount_mountable: Unmounts a mountable object.
128 * @unmount_mountable_finish: Finishes an unmount operation.
129 * @eject_mountable: Ejects a mountable.
130 * @eject_mountable_finish: Finishes an eject operation.
131 * @mount_enclosing_volume: Mounts a specified location.
132 * @mount_enclosing_volume_finish: Finishes mounting a specified location.
133 * @monitor_dir: Creates a #GFileMonitor for the location.
134 * @monitor_file: Creates a #GFileMonitor for the location.
135 * @open_readwrite: Open file read/write. Since 2.22.
136 * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22.
137 * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22.
138 * @create_readwrite: Creates file read/write. Since 2.22.
139 * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22.
140 * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22.
141 * @replace_readwrite: Replaces file read/write. Since 2.22.
142 * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22.
143 * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22.
144 * @start_mountable: Starts a mountable object. Since 2.22.
145 * @start_mountable_finish: Finishes an start operation. Since 2.22.
146 * @stop_mountable: Stops a mountable. Since 2.22.
147 * @stop_mountable_finish: Finishes an stop operation. Since 2.22.
148 * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22.
149 * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22.
150 * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22.
151 * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22.
152 * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
153 * @poll_mountable: Polls a mountable object for media changes. Since 2.22.
154 * @poll_mountable_finish: Finishes an poll operation for media changes. Since 2.22.
156 * An interface for writing VFS file handles.
160 GTypeInterface g_iface;
164 GFile * (* dup) (GFile *file);
165 guint (* hash) (GFile *file);
166 gboolean (* equal) (GFile *file1,
168 gboolean (* is_native) (GFile *file);
169 gboolean (* has_uri_scheme) (GFile *file,
170 const char *uri_scheme);
171 char * (* get_uri_scheme) (GFile *file);
172 char * (* get_basename) (GFile *file);
173 char * (* get_path) (GFile *file);
174 char * (* get_uri) (GFile *file);
175 char * (* get_parse_name) (GFile *file);
176 GFile * (* get_parent) (GFile *file);
177 gboolean (* prefix_matches) (GFile *prefix,
179 char * (* get_relative_path) (GFile *parent,
181 GFile * (* resolve_relative_path) (GFile *file,
182 const char *relative_path);
183 GFile * (* get_child_for_display_name) (GFile *file,
184 const char *display_name,
187 GFileEnumerator * (* enumerate_children) (GFile *file,
188 const char *attributes,
189 GFileQueryInfoFlags flags,
190 GCancellable *cancellable,
192 void (* enumerate_children_async) (GFile *file,
193 const char *attributes,
194 GFileQueryInfoFlags flags,
196 GCancellable *cancellable,
197 GAsyncReadyCallback callback,
199 GFileEnumerator * (* enumerate_children_finish) (GFile *file,
203 GFileInfo * (* query_info) (GFile *file,
204 const char *attributes,
205 GFileQueryInfoFlags flags,
206 GCancellable *cancellable,
208 void (* query_info_async) (GFile *file,
209 const char *attributes,
210 GFileQueryInfoFlags flags,
212 GCancellable *cancellable,
213 GAsyncReadyCallback callback,
215 GFileInfo * (* query_info_finish) (GFile *file,
219 GFileInfo * (* query_filesystem_info) (GFile *file,
220 const char *attributes,
221 GCancellable *cancellable,
223 void (* query_filesystem_info_async) (GFile *file,
224 const char *attributes,
226 GCancellable *cancellable,
227 GAsyncReadyCallback callback,
229 GFileInfo * (* query_filesystem_info_finish)(GFile *file,
233 GMount * (* find_enclosing_mount) (GFile *file,
234 GCancellable *cancellable,
236 void (* find_enclosing_mount_async) (GFile *file,
238 GCancellable *cancellable,
239 GAsyncReadyCallback callback,
241 GMount * (* find_enclosing_mount_finish) (GFile *file,
245 GFile * (* set_display_name) (GFile *file,
246 const char *display_name,
247 GCancellable *cancellable,
249 void (* set_display_name_async) (GFile *file,
250 const char *display_name,
252 GCancellable *cancellable,
253 GAsyncReadyCallback callback,
255 GFile * (* set_display_name_finish) (GFile *file,
259 GFileAttributeInfoList * (* query_settable_attributes) (GFile *file,
260 GCancellable *cancellable,
262 void (* _query_settable_attributes_async) (void);
263 void (* _query_settable_attributes_finish) (void);
265 GFileAttributeInfoList * (* query_writable_namespaces) (GFile *file,
266 GCancellable *cancellable,
268 void (* _query_writable_namespaces_async) (void);
269 void (* _query_writable_namespaces_finish) (void);
271 gboolean (* set_attribute) (GFile *file,
272 const char *attribute,
273 GFileAttributeType type,
275 GFileQueryInfoFlags flags,
276 GCancellable *cancellable,
278 gboolean (* set_attributes_from_info) (GFile *file,
280 GFileQueryInfoFlags flags,
281 GCancellable *cancellable,
283 void (* set_attributes_async) (GFile *file,
285 GFileQueryInfoFlags flags,
287 GCancellable *cancellable,
288 GAsyncReadyCallback callback,
290 gboolean (* set_attributes_finish) (GFile *file,
291 GAsyncResult *result,
295 GFileInputStream * (* read_fn) (GFile *file,
296 GCancellable *cancellable,
298 void (* read_async) (GFile *file,
300 GCancellable *cancellable,
301 GAsyncReadyCallback callback,
303 GFileInputStream * (* read_finish) (GFile *file,
307 GFileOutputStream * (* append_to) (GFile *file,
308 GFileCreateFlags flags,
309 GCancellable *cancellable,
311 void (* append_to_async) (GFile *file,
312 GFileCreateFlags flags,
314 GCancellable *cancellable,
315 GAsyncReadyCallback callback,
317 GFileOutputStream * (* append_to_finish) (GFile *file,
321 GFileOutputStream * (* create) (GFile *file,
322 GFileCreateFlags flags,
323 GCancellable *cancellable,
325 void (* create_async) (GFile *file,
326 GFileCreateFlags flags,
328 GCancellable *cancellable,
329 GAsyncReadyCallback callback,
331 GFileOutputStream * (* create_finish) (GFile *file,
335 GFileOutputStream * (* replace) (GFile *file,
337 gboolean make_backup,
338 GFileCreateFlags flags,
339 GCancellable *cancellable,
341 void (* replace_async) (GFile *file,
343 gboolean make_backup,
344 GFileCreateFlags flags,
346 GCancellable *cancellable,
347 GAsyncReadyCallback callback,
349 GFileOutputStream * (* replace_finish) (GFile *file,
353 gboolean (* delete_file) (GFile *file,
354 GCancellable *cancellable,
356 void (* delete_file_async) (GFile *file,
358 GCancellable *cancellable,
359 GAsyncReadyCallback callback,
361 gboolean (* delete_file_finish) (GFile *file,
362 GAsyncResult *result,
365 gboolean (* trash) (GFile *file,
366 GCancellable *cancellable,
368 void (* trash_async) (GFile *file,
370 GCancellable *cancellable,
371 GAsyncReadyCallback callback,
373 gboolean (* trash_finish) (GFile *file,
374 GAsyncResult *result,
377 gboolean (* make_directory) (GFile *file,
378 GCancellable *cancellable,
380 void (* _make_directory_async) (void);
381 void (* _make_directory_finish) (void);
383 gboolean (* make_symbolic_link) (GFile *file,
384 const char *symlink_value,
385 GCancellable *cancellable,
387 void (* _make_symbolic_link_async) (void);
388 void (* _make_symbolic_link_finish) (void);
390 gboolean (* copy) (GFile *source,
392 GFileCopyFlags flags,
393 GCancellable *cancellable,
394 GFileProgressCallback progress_callback,
395 gpointer progress_callback_data,
397 void (* copy_async) (GFile *source,
399 GFileCopyFlags flags,
401 GCancellable *cancellable,
402 GFileProgressCallback progress_callback,
403 gpointer progress_callback_data,
404 GAsyncReadyCallback callback,
406 gboolean (* copy_finish) (GFile *file,
410 gboolean (* move) (GFile *source,
412 GFileCopyFlags flags,
413 GCancellable *cancellable,
414 GFileProgressCallback progress_callback,
415 gpointer progress_callback_data,
417 void (* _move_async) (void);
418 void (* _move_finish) (void);
420 void (* mount_mountable) (GFile *file,
421 GMountMountFlags flags,
422 GMountOperation *mount_operation,
423 GCancellable *cancellable,
424 GAsyncReadyCallback callback,
426 GFile * (* mount_mountable_finish) (GFile *file,
427 GAsyncResult *result,
430 void (* unmount_mountable) (GFile *file,
431 GMountUnmountFlags flags,
432 GCancellable *cancellable,
433 GAsyncReadyCallback callback,
435 gboolean (* unmount_mountable_finish) (GFile *file,
436 GAsyncResult *result,
439 void (* eject_mountable) (GFile *file,
440 GMountUnmountFlags flags,
441 GCancellable *cancellable,
442 GAsyncReadyCallback callback,
444 gboolean (* eject_mountable_finish) (GFile *file,
445 GAsyncResult *result,
448 void (* mount_enclosing_volume) (GFile *location,
449 GMountMountFlags flags,
450 GMountOperation *mount_operation,
451 GCancellable *cancellable,
452 GAsyncReadyCallback callback,
454 gboolean (* mount_enclosing_volume_finish) (GFile *location,
455 GAsyncResult *result,
458 GFileMonitor * (* monitor_dir) (GFile *file,
459 GFileMonitorFlags flags,
460 GCancellable *cancellable,
462 GFileMonitor * (* monitor_file) (GFile *file,
463 GFileMonitorFlags flags,
464 GCancellable *cancellable,
467 GFileIOStream * (* open_readwrite) (GFile *file,
468 GCancellable *cancellable,
470 void (* open_readwrite_async) (GFile *file,
472 GCancellable *cancellable,
473 GAsyncReadyCallback callback,
475 GFileIOStream * (* open_readwrite_finish) (GFile *file,
478 GFileIOStream * (* create_readwrite) (GFile *file,
479 GFileCreateFlags flags,
480 GCancellable *cancellable,
482 void (* create_readwrite_async) (GFile *file,
483 GFileCreateFlags flags,
485 GCancellable *cancellable,
486 GAsyncReadyCallback callback,
488 GFileIOStream * (* create_readwrite_finish) (GFile *file,
491 GFileIOStream * (* replace_readwrite) (GFile *file,
493 gboolean make_backup,
494 GFileCreateFlags flags,
495 GCancellable *cancellable,
497 void (* replace_readwrite_async) (GFile *file,
499 gboolean make_backup,
500 GFileCreateFlags flags,
502 GCancellable *cancellable,
503 GAsyncReadyCallback callback,
505 GFileIOStream * (* replace_readwrite_finish) (GFile *file,
509 void (* start_mountable) (GFile *file,
510 GDriveStartFlags flags,
511 GMountOperation *start_operation,
512 GCancellable *cancellable,
513 GAsyncReadyCallback callback,
515 gboolean (* start_mountable_finish) (GFile *file,
516 GAsyncResult *result,
519 void (* stop_mountable) (GFile *file,
520 GMountUnmountFlags flags,
521 GMountOperation *mount_operation,
522 GCancellable *cancellable,
523 GAsyncReadyCallback callback,
525 gboolean (* stop_mountable_finish) (GFile *file,
526 GAsyncResult *result,
529 gboolean supports_thread_contexts;
531 void (* unmount_mountable_with_operation) (GFile *file,
532 GMountUnmountFlags flags,
533 GMountOperation *mount_operation,
534 GCancellable *cancellable,
535 GAsyncReadyCallback callback,
537 gboolean (* unmount_mountable_with_operation_finish) (GFile *file,
538 GAsyncResult *result,
541 void (* eject_mountable_with_operation) (GFile *file,
542 GMountUnmountFlags flags,
543 GMountOperation *mount_operation,
544 GCancellable *cancellable,
545 GAsyncReadyCallback callback,
547 gboolean (* eject_mountable_with_operation_finish) (GFile *file,
548 GAsyncResult *result,
551 void (* poll_mountable) (GFile *file,
552 GCancellable *cancellable,
553 GAsyncReadyCallback callback,
555 gboolean (* poll_mountable_finish) (GFile *file,
556 GAsyncResult *result,
560 GLIB_AVAILABLE_IN_ALL
561 GType g_file_get_type (void) G_GNUC_CONST;
563 GLIB_AVAILABLE_IN_ALL
564 GFile * g_file_new_for_path (const char *path);
565 GLIB_AVAILABLE_IN_ALL
566 GFile * g_file_new_for_uri (const char *uri);
567 GLIB_AVAILABLE_IN_ALL
568 GFile * g_file_new_for_commandline_arg (const char *arg);
569 GLIB_AVAILABLE_IN_2_36
570 GFile * g_file_new_for_commandline_arg_and_cwd (const gchar *arg,
572 GLIB_AVAILABLE_IN_2_32
573 GFile * g_file_new_tmp (const char *tmpl,
574 GFileIOStream **iostream,
576 GLIB_AVAILABLE_IN_ALL
577 GFile * g_file_parse_name (const char *parse_name);
578 GLIB_AVAILABLE_IN_ALL
579 GFile * g_file_dup (GFile *file);
580 GLIB_AVAILABLE_IN_ALL
581 guint g_file_hash (gconstpointer file);
582 GLIB_AVAILABLE_IN_ALL
583 gboolean g_file_equal (GFile *file1,
585 GLIB_AVAILABLE_IN_ALL
586 char * g_file_get_basename (GFile *file);
587 GLIB_AVAILABLE_IN_ALL
588 char * g_file_get_path (GFile *file);
589 GLIB_AVAILABLE_IN_ALL
590 char * g_file_get_uri (GFile *file);
591 GLIB_AVAILABLE_IN_ALL
592 char * g_file_get_parse_name (GFile *file);
593 GLIB_AVAILABLE_IN_ALL
594 GFile * g_file_get_parent (GFile *file);
595 GLIB_AVAILABLE_IN_ALL
596 gboolean g_file_has_parent (GFile *file,
598 GLIB_AVAILABLE_IN_ALL
599 GFile * g_file_get_child (GFile *file,
601 GLIB_AVAILABLE_IN_ALL
602 GFile * g_file_get_child_for_display_name (GFile *file,
603 const char *display_name,
605 GLIB_AVAILABLE_IN_ALL
606 gboolean g_file_has_prefix (GFile *file,
608 GLIB_AVAILABLE_IN_ALL
609 char * g_file_get_relative_path (GFile *parent,
611 GLIB_AVAILABLE_IN_ALL
612 GFile * g_file_resolve_relative_path (GFile *file,
613 const char *relative_path);
614 GLIB_AVAILABLE_IN_ALL
615 gboolean g_file_is_native (GFile *file);
616 GLIB_AVAILABLE_IN_ALL
617 gboolean g_file_has_uri_scheme (GFile *file,
618 const char *uri_scheme);
619 GLIB_AVAILABLE_IN_ALL
620 char * g_file_get_uri_scheme (GFile *file);
621 GLIB_AVAILABLE_IN_ALL
622 GFileInputStream * g_file_read (GFile *file,
623 GCancellable *cancellable,
625 GLIB_AVAILABLE_IN_ALL
626 void g_file_read_async (GFile *file,
628 GCancellable *cancellable,
629 GAsyncReadyCallback callback,
631 GLIB_AVAILABLE_IN_ALL
632 GFileInputStream * g_file_read_finish (GFile *file,
635 GLIB_AVAILABLE_IN_ALL
636 GFileOutputStream * g_file_append_to (GFile *file,
637 GFileCreateFlags flags,
638 GCancellable *cancellable,
640 GLIB_AVAILABLE_IN_ALL
641 GFileOutputStream * g_file_create (GFile *file,
642 GFileCreateFlags flags,
643 GCancellable *cancellable,
645 GLIB_AVAILABLE_IN_ALL
646 GFileOutputStream * g_file_replace (GFile *file,
648 gboolean make_backup,
649 GFileCreateFlags flags,
650 GCancellable *cancellable,
652 GLIB_AVAILABLE_IN_ALL
653 void g_file_append_to_async (GFile *file,
654 GFileCreateFlags flags,
656 GCancellable *cancellable,
657 GAsyncReadyCallback callback,
659 GLIB_AVAILABLE_IN_ALL
660 GFileOutputStream * g_file_append_to_finish (GFile *file,
663 GLIB_AVAILABLE_IN_ALL
664 void g_file_create_async (GFile *file,
665 GFileCreateFlags flags,
667 GCancellable *cancellable,
668 GAsyncReadyCallback callback,
670 GLIB_AVAILABLE_IN_ALL
671 GFileOutputStream * g_file_create_finish (GFile *file,
674 GLIB_AVAILABLE_IN_ALL
675 void g_file_replace_async (GFile *file,
677 gboolean make_backup,
678 GFileCreateFlags flags,
680 GCancellable *cancellable,
681 GAsyncReadyCallback callback,
683 GLIB_AVAILABLE_IN_ALL
684 GFileOutputStream * g_file_replace_finish (GFile *file,
687 GLIB_AVAILABLE_IN_ALL
688 GFileIOStream * g_file_open_readwrite (GFile *file,
689 GCancellable *cancellable,
691 GLIB_AVAILABLE_IN_ALL
692 void g_file_open_readwrite_async (GFile *file,
694 GCancellable *cancellable,
695 GAsyncReadyCallback callback,
697 GLIB_AVAILABLE_IN_ALL
698 GFileIOStream * g_file_open_readwrite_finish (GFile *file,
701 GLIB_AVAILABLE_IN_ALL
702 GFileIOStream * g_file_create_readwrite (GFile *file,
703 GFileCreateFlags flags,
704 GCancellable *cancellable,
706 GLIB_AVAILABLE_IN_ALL
707 void g_file_create_readwrite_async (GFile *file,
708 GFileCreateFlags flags,
710 GCancellable *cancellable,
711 GAsyncReadyCallback callback,
713 GLIB_AVAILABLE_IN_ALL
714 GFileIOStream * g_file_create_readwrite_finish (GFile *file,
717 GLIB_AVAILABLE_IN_ALL
718 GFileIOStream * g_file_replace_readwrite (GFile *file,
720 gboolean make_backup,
721 GFileCreateFlags flags,
722 GCancellable *cancellable,
724 GLIB_AVAILABLE_IN_ALL
725 void g_file_replace_readwrite_async (GFile *file,
727 gboolean make_backup,
728 GFileCreateFlags flags,
730 GCancellable *cancellable,
731 GAsyncReadyCallback callback,
733 GLIB_AVAILABLE_IN_ALL
734 GFileIOStream * g_file_replace_readwrite_finish (GFile *file,
737 GLIB_AVAILABLE_IN_ALL
738 gboolean g_file_query_exists (GFile *file,
739 GCancellable *cancellable);
740 GLIB_AVAILABLE_IN_ALL
741 GFileType g_file_query_file_type (GFile *file,
742 GFileQueryInfoFlags flags,
743 GCancellable *cancellable);
744 GLIB_AVAILABLE_IN_ALL
745 GFileInfo * g_file_query_info (GFile *file,
746 const char *attributes,
747 GFileQueryInfoFlags flags,
748 GCancellable *cancellable,
750 GLIB_AVAILABLE_IN_ALL
751 void g_file_query_info_async (GFile *file,
752 const char *attributes,
753 GFileQueryInfoFlags flags,
755 GCancellable *cancellable,
756 GAsyncReadyCallback callback,
758 GLIB_AVAILABLE_IN_ALL
759 GFileInfo * g_file_query_info_finish (GFile *file,
762 GLIB_AVAILABLE_IN_ALL
763 GFileInfo * g_file_query_filesystem_info (GFile *file,
764 const char *attributes,
765 GCancellable *cancellable,
767 GLIB_AVAILABLE_IN_ALL
768 void g_file_query_filesystem_info_async (GFile *file,
769 const char *attributes,
771 GCancellable *cancellable,
772 GAsyncReadyCallback callback,
774 GLIB_AVAILABLE_IN_ALL
775 GFileInfo * g_file_query_filesystem_info_finish (GFile *file,
778 GLIB_AVAILABLE_IN_ALL
779 GMount * g_file_find_enclosing_mount (GFile *file,
780 GCancellable *cancellable,
782 GLIB_AVAILABLE_IN_ALL
783 void g_file_find_enclosing_mount_async (GFile *file,
785 GCancellable *cancellable,
786 GAsyncReadyCallback callback,
788 GLIB_AVAILABLE_IN_ALL
789 GMount * g_file_find_enclosing_mount_finish (GFile *file,
792 GLIB_AVAILABLE_IN_ALL
793 GFileEnumerator * g_file_enumerate_children (GFile *file,
794 const char *attributes,
795 GFileQueryInfoFlags flags,
796 GCancellable *cancellable,
798 GLIB_AVAILABLE_IN_ALL
799 void g_file_enumerate_children_async (GFile *file,
800 const char *attributes,
801 GFileQueryInfoFlags flags,
803 GCancellable *cancellable,
804 GAsyncReadyCallback callback,
806 GLIB_AVAILABLE_IN_ALL
807 GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
810 GLIB_AVAILABLE_IN_ALL
811 GFile * g_file_set_display_name (GFile *file,
812 const char *display_name,
813 GCancellable *cancellable,
815 GLIB_AVAILABLE_IN_ALL
816 void g_file_set_display_name_async (GFile *file,
817 const char *display_name,
819 GCancellable *cancellable,
820 GAsyncReadyCallback callback,
822 GLIB_AVAILABLE_IN_ALL
823 GFile * g_file_set_display_name_finish (GFile *file,
826 GLIB_AVAILABLE_IN_ALL
827 gboolean g_file_delete (GFile *file,
828 GCancellable *cancellable,
831 GLIB_AVAILABLE_IN_2_34
832 void g_file_delete_async (GFile *file,
834 GCancellable *cancellable,
835 GAsyncReadyCallback callback,
838 GLIB_AVAILABLE_IN_2_34
839 gboolean g_file_delete_finish (GFile *file,
840 GAsyncResult *result,
843 GLIB_AVAILABLE_IN_ALL
844 gboolean g_file_trash (GFile *file,
845 GCancellable *cancellable,
848 GLIB_AVAILABLE_IN_2_38
849 void g_file_trash_async (GFile *file,
851 GCancellable *cancellable,
852 GAsyncReadyCallback callback,
855 GLIB_AVAILABLE_IN_2_38
856 gboolean g_file_trash_finish (GFile *file,
857 GAsyncResult *result,
860 GLIB_AVAILABLE_IN_ALL
861 gboolean g_file_copy (GFile *source,
863 GFileCopyFlags flags,
864 GCancellable *cancellable,
865 GFileProgressCallback progress_callback,
866 gpointer progress_callback_data,
868 GLIB_AVAILABLE_IN_ALL
869 void g_file_copy_async (GFile *source,
871 GFileCopyFlags flags,
873 GCancellable *cancellable,
874 GFileProgressCallback progress_callback,
875 gpointer progress_callback_data,
876 GAsyncReadyCallback callback,
878 GLIB_AVAILABLE_IN_ALL
879 gboolean g_file_copy_finish (GFile *file,
882 GLIB_AVAILABLE_IN_ALL
883 gboolean g_file_move (GFile *source,
885 GFileCopyFlags flags,
886 GCancellable *cancellable,
887 GFileProgressCallback progress_callback,
888 gpointer progress_callback_data,
890 GLIB_AVAILABLE_IN_ALL
891 gboolean g_file_make_directory (GFile *file,
892 GCancellable *cancellable,
894 GLIB_AVAILABLE_IN_ALL
895 gboolean g_file_make_directory_with_parents (GFile *file,
896 GCancellable *cancellable,
898 GLIB_AVAILABLE_IN_ALL
899 gboolean g_file_make_symbolic_link (GFile *file,
900 const char *symlink_value,
901 GCancellable *cancellable,
903 GLIB_AVAILABLE_IN_ALL
904 GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
905 GCancellable *cancellable,
907 GLIB_AVAILABLE_IN_ALL
908 GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
909 GCancellable *cancellable,
911 GLIB_AVAILABLE_IN_ALL
912 gboolean g_file_set_attribute (GFile *file,
913 const char *attribute,
914 GFileAttributeType type,
916 GFileQueryInfoFlags flags,
917 GCancellable *cancellable,
919 GLIB_AVAILABLE_IN_ALL
920 gboolean g_file_set_attributes_from_info (GFile *file,
922 GFileQueryInfoFlags flags,
923 GCancellable *cancellable,
925 GLIB_AVAILABLE_IN_ALL
926 void g_file_set_attributes_async (GFile *file,
928 GFileQueryInfoFlags flags,
930 GCancellable *cancellable,
931 GAsyncReadyCallback callback,
933 GLIB_AVAILABLE_IN_ALL
934 gboolean g_file_set_attributes_finish (GFile *file,
935 GAsyncResult *result,
938 GLIB_AVAILABLE_IN_ALL
939 gboolean g_file_set_attribute_string (GFile *file,
940 const char *attribute,
942 GFileQueryInfoFlags flags,
943 GCancellable *cancellable,
945 GLIB_AVAILABLE_IN_ALL
946 gboolean g_file_set_attribute_byte_string (GFile *file,
947 const char *attribute,
949 GFileQueryInfoFlags flags,
950 GCancellable *cancellable,
952 GLIB_AVAILABLE_IN_ALL
953 gboolean g_file_set_attribute_uint32 (GFile *file,
954 const char *attribute,
956 GFileQueryInfoFlags flags,
957 GCancellable *cancellable,
959 GLIB_AVAILABLE_IN_ALL
960 gboolean g_file_set_attribute_int32 (GFile *file,
961 const char *attribute,
963 GFileQueryInfoFlags flags,
964 GCancellable *cancellable,
966 GLIB_AVAILABLE_IN_ALL
967 gboolean g_file_set_attribute_uint64 (GFile *file,
968 const char *attribute,
970 GFileQueryInfoFlags flags,
971 GCancellable *cancellable,
973 GLIB_AVAILABLE_IN_ALL
974 gboolean g_file_set_attribute_int64 (GFile *file,
975 const char *attribute,
977 GFileQueryInfoFlags flags,
978 GCancellable *cancellable,
980 GLIB_AVAILABLE_IN_ALL
981 void g_file_mount_enclosing_volume (GFile *location,
982 GMountMountFlags flags,
983 GMountOperation *mount_operation,
984 GCancellable *cancellable,
985 GAsyncReadyCallback callback,
987 GLIB_AVAILABLE_IN_ALL
988 gboolean g_file_mount_enclosing_volume_finish (GFile *location,
989 GAsyncResult *result,
991 GLIB_AVAILABLE_IN_ALL
992 void g_file_mount_mountable (GFile *file,
993 GMountMountFlags flags,
994 GMountOperation *mount_operation,
995 GCancellable *cancellable,
996 GAsyncReadyCallback callback,
998 GLIB_AVAILABLE_IN_ALL
999 GFile * g_file_mount_mountable_finish (GFile *file,
1000 GAsyncResult *result,
1002 GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation)
1003 void g_file_unmount_mountable (GFile *file,
1004 GMountUnmountFlags flags,
1005 GCancellable *cancellable,
1006 GAsyncReadyCallback callback,
1007 gpointer user_data);
1009 GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation_finish)
1010 gboolean g_file_unmount_mountable_finish (GFile *file,
1011 GAsyncResult *result,
1013 GLIB_AVAILABLE_IN_ALL
1014 void g_file_unmount_mountable_with_operation (GFile *file,
1015 GMountUnmountFlags flags,
1016 GMountOperation *mount_operation,
1017 GCancellable *cancellable,
1018 GAsyncReadyCallback callback,
1019 gpointer user_data);
1020 GLIB_AVAILABLE_IN_ALL
1021 gboolean g_file_unmount_mountable_with_operation_finish (GFile *file,
1022 GAsyncResult *result,
1024 GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation)
1025 void g_file_eject_mountable (GFile *file,
1026 GMountUnmountFlags flags,
1027 GCancellable *cancellable,
1028 GAsyncReadyCallback callback,
1029 gpointer user_data);
1031 GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation_finish)
1032 gboolean g_file_eject_mountable_finish (GFile *file,
1033 GAsyncResult *result,
1035 GLIB_AVAILABLE_IN_ALL
1036 void g_file_eject_mountable_with_operation (GFile *file,
1037 GMountUnmountFlags flags,
1038 GMountOperation *mount_operation,
1039 GCancellable *cancellable,
1040 GAsyncReadyCallback callback,
1041 gpointer user_data);
1042 GLIB_AVAILABLE_IN_ALL
1043 gboolean g_file_eject_mountable_with_operation_finish (GFile *file,
1044 GAsyncResult *result,
1047 GLIB_AVAILABLE_IN_ALL
1048 gboolean g_file_copy_attributes (GFile *source,
1050 GFileCopyFlags flags,
1051 GCancellable *cancellable,
1055 GLIB_AVAILABLE_IN_ALL
1056 GFileMonitor* g_file_monitor_directory (GFile *file,
1057 GFileMonitorFlags flags,
1058 GCancellable *cancellable,
1060 GLIB_AVAILABLE_IN_ALL
1061 GFileMonitor* g_file_monitor_file (GFile *file,
1062 GFileMonitorFlags flags,
1063 GCancellable *cancellable,
1065 GLIB_AVAILABLE_IN_ALL
1066 GFileMonitor* g_file_monitor (GFile *file,
1067 GFileMonitorFlags flags,
1068 GCancellable *cancellable,
1071 GLIB_AVAILABLE_IN_ALL
1072 void g_file_start_mountable (GFile *file,
1073 GDriveStartFlags flags,
1074 GMountOperation *start_operation,
1075 GCancellable *cancellable,
1076 GAsyncReadyCallback callback,
1077 gpointer user_data);
1078 GLIB_AVAILABLE_IN_ALL
1079 gboolean g_file_start_mountable_finish (GFile *file,
1080 GAsyncResult *result,
1082 GLIB_AVAILABLE_IN_ALL
1083 void g_file_stop_mountable (GFile *file,
1084 GMountUnmountFlags flags,
1085 GMountOperation *mount_operation,
1086 GCancellable *cancellable,
1087 GAsyncReadyCallback callback,
1088 gpointer user_data);
1089 GLIB_AVAILABLE_IN_ALL
1090 gboolean g_file_stop_mountable_finish (GFile *file,
1091 GAsyncResult *result,
1094 GLIB_AVAILABLE_IN_ALL
1095 void g_file_poll_mountable (GFile *file,
1096 GCancellable *cancellable,
1097 GAsyncReadyCallback callback,
1098 gpointer user_data);
1099 GLIB_AVAILABLE_IN_ALL
1100 gboolean g_file_poll_mountable_finish (GFile *file,
1101 GAsyncResult *result,
1106 GLIB_AVAILABLE_IN_ALL
1107 GAppInfo *g_file_query_default_handler (GFile *file,
1108 GCancellable *cancellable,
1110 GLIB_AVAILABLE_IN_ALL
1111 gboolean g_file_load_contents (GFile *file,
1112 GCancellable *cancellable,
1117 GLIB_AVAILABLE_IN_ALL
1118 void g_file_load_contents_async (GFile *file,
1119 GCancellable *cancellable,
1120 GAsyncReadyCallback callback,
1121 gpointer user_data);
1122 GLIB_AVAILABLE_IN_ALL
1123 gboolean g_file_load_contents_finish (GFile *file,
1129 GLIB_AVAILABLE_IN_ALL
1130 void g_file_load_partial_contents_async (GFile *file,
1131 GCancellable *cancellable,
1132 GFileReadMoreCallback read_more_callback,
1133 GAsyncReadyCallback callback,
1134 gpointer user_data);
1135 GLIB_AVAILABLE_IN_ALL
1136 gboolean g_file_load_partial_contents_finish (GFile *file,
1142 GLIB_AVAILABLE_IN_ALL
1143 gboolean g_file_replace_contents (GFile *file,
1144 const char *contents,
1147 gboolean make_backup,
1148 GFileCreateFlags flags,
1150 GCancellable *cancellable,
1152 GLIB_AVAILABLE_IN_ALL
1153 void g_file_replace_contents_async (GFile *file,
1154 const char *contents,
1157 gboolean make_backup,
1158 GFileCreateFlags flags,
1159 GCancellable *cancellable,
1160 GAsyncReadyCallback callback,
1161 gpointer user_data);
1162 GLIB_AVAILABLE_IN_ALL
1163 gboolean g_file_replace_contents_finish (GFile *file,
1168 GLIB_AVAILABLE_IN_ALL
1169 gboolean g_file_supports_thread_contexts (GFile *file);
1173 #endif /* __G_FILE_H__ */