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) (GFile *file,
382 GCancellable *cancellable,
383 GAsyncReadyCallback callback,
385 gboolean (* make_directory_finish) (GFile *file,
386 GAsyncResult *result,
389 gboolean (* make_symbolic_link) (GFile *file,
390 const char *symlink_value,
391 GCancellable *cancellable,
393 void (* _make_symbolic_link_async) (void);
394 void (* _make_symbolic_link_finish) (void);
396 gboolean (* copy) (GFile *source,
398 GFileCopyFlags flags,
399 GCancellable *cancellable,
400 GFileProgressCallback progress_callback,
401 gpointer progress_callback_data,
403 void (* copy_async) (GFile *source,
405 GFileCopyFlags flags,
407 GCancellable *cancellable,
408 GFileProgressCallback progress_callback,
409 gpointer progress_callback_data,
410 GAsyncReadyCallback callback,
412 gboolean (* copy_finish) (GFile *file,
416 gboolean (* move) (GFile *source,
418 GFileCopyFlags flags,
419 GCancellable *cancellable,
420 GFileProgressCallback progress_callback,
421 gpointer progress_callback_data,
423 void (* _move_async) (void);
424 void (* _move_finish) (void);
426 void (* mount_mountable) (GFile *file,
427 GMountMountFlags flags,
428 GMountOperation *mount_operation,
429 GCancellable *cancellable,
430 GAsyncReadyCallback callback,
432 GFile * (* mount_mountable_finish) (GFile *file,
433 GAsyncResult *result,
436 void (* unmount_mountable) (GFile *file,
437 GMountUnmountFlags flags,
438 GCancellable *cancellable,
439 GAsyncReadyCallback callback,
441 gboolean (* unmount_mountable_finish) (GFile *file,
442 GAsyncResult *result,
445 void (* eject_mountable) (GFile *file,
446 GMountUnmountFlags flags,
447 GCancellable *cancellable,
448 GAsyncReadyCallback callback,
450 gboolean (* eject_mountable_finish) (GFile *file,
451 GAsyncResult *result,
454 void (* mount_enclosing_volume) (GFile *location,
455 GMountMountFlags flags,
456 GMountOperation *mount_operation,
457 GCancellable *cancellable,
458 GAsyncReadyCallback callback,
460 gboolean (* mount_enclosing_volume_finish) (GFile *location,
461 GAsyncResult *result,
464 GFileMonitor * (* monitor_dir) (GFile *file,
465 GFileMonitorFlags flags,
466 GCancellable *cancellable,
468 GFileMonitor * (* monitor_file) (GFile *file,
469 GFileMonitorFlags flags,
470 GCancellable *cancellable,
473 GFileIOStream * (* open_readwrite) (GFile *file,
474 GCancellable *cancellable,
476 void (* open_readwrite_async) (GFile *file,
478 GCancellable *cancellable,
479 GAsyncReadyCallback callback,
481 GFileIOStream * (* open_readwrite_finish) (GFile *file,
484 GFileIOStream * (* create_readwrite) (GFile *file,
485 GFileCreateFlags flags,
486 GCancellable *cancellable,
488 void (* create_readwrite_async) (GFile *file,
489 GFileCreateFlags flags,
491 GCancellable *cancellable,
492 GAsyncReadyCallback callback,
494 GFileIOStream * (* create_readwrite_finish) (GFile *file,
497 GFileIOStream * (* replace_readwrite) (GFile *file,
499 gboolean make_backup,
500 GFileCreateFlags flags,
501 GCancellable *cancellable,
503 void (* replace_readwrite_async) (GFile *file,
505 gboolean make_backup,
506 GFileCreateFlags flags,
508 GCancellable *cancellable,
509 GAsyncReadyCallback callback,
511 GFileIOStream * (* replace_readwrite_finish) (GFile *file,
515 void (* start_mountable) (GFile *file,
516 GDriveStartFlags flags,
517 GMountOperation *start_operation,
518 GCancellable *cancellable,
519 GAsyncReadyCallback callback,
521 gboolean (* start_mountable_finish) (GFile *file,
522 GAsyncResult *result,
525 void (* stop_mountable) (GFile *file,
526 GMountUnmountFlags flags,
527 GMountOperation *mount_operation,
528 GCancellable *cancellable,
529 GAsyncReadyCallback callback,
531 gboolean (* stop_mountable_finish) (GFile *file,
532 GAsyncResult *result,
535 gboolean supports_thread_contexts;
537 void (* unmount_mountable_with_operation) (GFile *file,
538 GMountUnmountFlags flags,
539 GMountOperation *mount_operation,
540 GCancellable *cancellable,
541 GAsyncReadyCallback callback,
543 gboolean (* unmount_mountable_with_operation_finish) (GFile *file,
544 GAsyncResult *result,
547 void (* eject_mountable_with_operation) (GFile *file,
548 GMountUnmountFlags flags,
549 GMountOperation *mount_operation,
550 GCancellable *cancellable,
551 GAsyncReadyCallback callback,
553 gboolean (* eject_mountable_with_operation_finish) (GFile *file,
554 GAsyncResult *result,
557 void (* poll_mountable) (GFile *file,
558 GCancellable *cancellable,
559 GAsyncReadyCallback callback,
561 gboolean (* poll_mountable_finish) (GFile *file,
562 GAsyncResult *result,
566 GLIB_AVAILABLE_IN_ALL
567 GType g_file_get_type (void) G_GNUC_CONST;
569 GLIB_AVAILABLE_IN_ALL
570 GFile * g_file_new_for_path (const char *path);
571 GLIB_AVAILABLE_IN_ALL
572 GFile * g_file_new_for_uri (const char *uri);
573 GLIB_AVAILABLE_IN_ALL
574 GFile * g_file_new_for_commandline_arg (const char *arg);
575 GLIB_AVAILABLE_IN_2_36
576 GFile * g_file_new_for_commandline_arg_and_cwd (const gchar *arg,
578 GLIB_AVAILABLE_IN_2_32
579 GFile * g_file_new_tmp (const char *tmpl,
580 GFileIOStream **iostream,
582 GLIB_AVAILABLE_IN_ALL
583 GFile * g_file_parse_name (const char *parse_name);
584 GLIB_AVAILABLE_IN_ALL
585 GFile * g_file_dup (GFile *file);
586 GLIB_AVAILABLE_IN_ALL
587 guint g_file_hash (gconstpointer file);
588 GLIB_AVAILABLE_IN_ALL
589 gboolean g_file_equal (GFile *file1,
591 GLIB_AVAILABLE_IN_ALL
592 char * g_file_get_basename (GFile *file);
593 GLIB_AVAILABLE_IN_ALL
594 char * g_file_get_path (GFile *file);
595 GLIB_AVAILABLE_IN_ALL
596 char * g_file_get_uri (GFile *file);
597 GLIB_AVAILABLE_IN_ALL
598 char * g_file_get_parse_name (GFile *file);
599 GLIB_AVAILABLE_IN_ALL
600 GFile * g_file_get_parent (GFile *file);
601 GLIB_AVAILABLE_IN_ALL
602 gboolean g_file_has_parent (GFile *file,
604 GLIB_AVAILABLE_IN_ALL
605 GFile * g_file_get_child (GFile *file,
607 GLIB_AVAILABLE_IN_ALL
608 GFile * g_file_get_child_for_display_name (GFile *file,
609 const char *display_name,
611 GLIB_AVAILABLE_IN_ALL
612 gboolean g_file_has_prefix (GFile *file,
614 GLIB_AVAILABLE_IN_ALL
615 char * g_file_get_relative_path (GFile *parent,
617 GLIB_AVAILABLE_IN_ALL
618 GFile * g_file_resolve_relative_path (GFile *file,
619 const char *relative_path);
620 GLIB_AVAILABLE_IN_ALL
621 gboolean g_file_is_native (GFile *file);
622 GLIB_AVAILABLE_IN_ALL
623 gboolean g_file_has_uri_scheme (GFile *file,
624 const char *uri_scheme);
625 GLIB_AVAILABLE_IN_ALL
626 char * g_file_get_uri_scheme (GFile *file);
627 GLIB_AVAILABLE_IN_ALL
628 GFileInputStream * g_file_read (GFile *file,
629 GCancellable *cancellable,
631 GLIB_AVAILABLE_IN_ALL
632 void g_file_read_async (GFile *file,
634 GCancellable *cancellable,
635 GAsyncReadyCallback callback,
637 GLIB_AVAILABLE_IN_ALL
638 GFileInputStream * g_file_read_finish (GFile *file,
641 GLIB_AVAILABLE_IN_ALL
642 GFileOutputStream * g_file_append_to (GFile *file,
643 GFileCreateFlags flags,
644 GCancellable *cancellable,
646 GLIB_AVAILABLE_IN_ALL
647 GFileOutputStream * g_file_create (GFile *file,
648 GFileCreateFlags flags,
649 GCancellable *cancellable,
651 GLIB_AVAILABLE_IN_ALL
652 GFileOutputStream * g_file_replace (GFile *file,
654 gboolean make_backup,
655 GFileCreateFlags flags,
656 GCancellable *cancellable,
658 GLIB_AVAILABLE_IN_ALL
659 void g_file_append_to_async (GFile *file,
660 GFileCreateFlags flags,
662 GCancellable *cancellable,
663 GAsyncReadyCallback callback,
665 GLIB_AVAILABLE_IN_ALL
666 GFileOutputStream * g_file_append_to_finish (GFile *file,
669 GLIB_AVAILABLE_IN_ALL
670 void g_file_create_async (GFile *file,
671 GFileCreateFlags flags,
673 GCancellable *cancellable,
674 GAsyncReadyCallback callback,
676 GLIB_AVAILABLE_IN_ALL
677 GFileOutputStream * g_file_create_finish (GFile *file,
680 GLIB_AVAILABLE_IN_ALL
681 void g_file_replace_async (GFile *file,
683 gboolean make_backup,
684 GFileCreateFlags flags,
686 GCancellable *cancellable,
687 GAsyncReadyCallback callback,
689 GLIB_AVAILABLE_IN_ALL
690 GFileOutputStream * g_file_replace_finish (GFile *file,
693 GLIB_AVAILABLE_IN_ALL
694 GFileIOStream * g_file_open_readwrite (GFile *file,
695 GCancellable *cancellable,
697 GLIB_AVAILABLE_IN_ALL
698 void g_file_open_readwrite_async (GFile *file,
700 GCancellable *cancellable,
701 GAsyncReadyCallback callback,
703 GLIB_AVAILABLE_IN_ALL
704 GFileIOStream * g_file_open_readwrite_finish (GFile *file,
707 GLIB_AVAILABLE_IN_ALL
708 GFileIOStream * g_file_create_readwrite (GFile *file,
709 GFileCreateFlags flags,
710 GCancellable *cancellable,
712 GLIB_AVAILABLE_IN_ALL
713 void g_file_create_readwrite_async (GFile *file,
714 GFileCreateFlags flags,
716 GCancellable *cancellable,
717 GAsyncReadyCallback callback,
719 GLIB_AVAILABLE_IN_ALL
720 GFileIOStream * g_file_create_readwrite_finish (GFile *file,
723 GLIB_AVAILABLE_IN_ALL
724 GFileIOStream * g_file_replace_readwrite (GFile *file,
726 gboolean make_backup,
727 GFileCreateFlags flags,
728 GCancellable *cancellable,
730 GLIB_AVAILABLE_IN_ALL
731 void g_file_replace_readwrite_async (GFile *file,
733 gboolean make_backup,
734 GFileCreateFlags flags,
736 GCancellable *cancellable,
737 GAsyncReadyCallback callback,
739 GLIB_AVAILABLE_IN_ALL
740 GFileIOStream * g_file_replace_readwrite_finish (GFile *file,
743 GLIB_AVAILABLE_IN_ALL
744 gboolean g_file_query_exists (GFile *file,
745 GCancellable *cancellable);
746 GLIB_AVAILABLE_IN_ALL
747 GFileType g_file_query_file_type (GFile *file,
748 GFileQueryInfoFlags flags,
749 GCancellable *cancellable);
750 GLIB_AVAILABLE_IN_ALL
751 GFileInfo * g_file_query_info (GFile *file,
752 const char *attributes,
753 GFileQueryInfoFlags flags,
754 GCancellable *cancellable,
756 GLIB_AVAILABLE_IN_ALL
757 void g_file_query_info_async (GFile *file,
758 const char *attributes,
759 GFileQueryInfoFlags flags,
761 GCancellable *cancellable,
762 GAsyncReadyCallback callback,
764 GLIB_AVAILABLE_IN_ALL
765 GFileInfo * g_file_query_info_finish (GFile *file,
768 GLIB_AVAILABLE_IN_ALL
769 GFileInfo * g_file_query_filesystem_info (GFile *file,
770 const char *attributes,
771 GCancellable *cancellable,
773 GLIB_AVAILABLE_IN_ALL
774 void g_file_query_filesystem_info_async (GFile *file,
775 const char *attributes,
777 GCancellable *cancellable,
778 GAsyncReadyCallback callback,
780 GLIB_AVAILABLE_IN_ALL
781 GFileInfo * g_file_query_filesystem_info_finish (GFile *file,
784 GLIB_AVAILABLE_IN_ALL
785 GMount * g_file_find_enclosing_mount (GFile *file,
786 GCancellable *cancellable,
788 GLIB_AVAILABLE_IN_ALL
789 void g_file_find_enclosing_mount_async (GFile *file,
791 GCancellable *cancellable,
792 GAsyncReadyCallback callback,
794 GLIB_AVAILABLE_IN_ALL
795 GMount * g_file_find_enclosing_mount_finish (GFile *file,
798 GLIB_AVAILABLE_IN_ALL
799 GFileEnumerator * g_file_enumerate_children (GFile *file,
800 const char *attributes,
801 GFileQueryInfoFlags flags,
802 GCancellable *cancellable,
804 GLIB_AVAILABLE_IN_ALL
805 void g_file_enumerate_children_async (GFile *file,
806 const char *attributes,
807 GFileQueryInfoFlags flags,
809 GCancellable *cancellable,
810 GAsyncReadyCallback callback,
812 GLIB_AVAILABLE_IN_ALL
813 GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
816 GLIB_AVAILABLE_IN_ALL
817 GFile * g_file_set_display_name (GFile *file,
818 const char *display_name,
819 GCancellable *cancellable,
821 GLIB_AVAILABLE_IN_ALL
822 void g_file_set_display_name_async (GFile *file,
823 const char *display_name,
825 GCancellable *cancellable,
826 GAsyncReadyCallback callback,
828 GLIB_AVAILABLE_IN_ALL
829 GFile * g_file_set_display_name_finish (GFile *file,
832 GLIB_AVAILABLE_IN_ALL
833 gboolean g_file_delete (GFile *file,
834 GCancellable *cancellable,
837 GLIB_AVAILABLE_IN_2_34
838 void g_file_delete_async (GFile *file,
840 GCancellable *cancellable,
841 GAsyncReadyCallback callback,
844 GLIB_AVAILABLE_IN_2_34
845 gboolean g_file_delete_finish (GFile *file,
846 GAsyncResult *result,
849 GLIB_AVAILABLE_IN_ALL
850 gboolean g_file_trash (GFile *file,
851 GCancellable *cancellable,
854 GLIB_AVAILABLE_IN_2_38
855 void g_file_trash_async (GFile *file,
857 GCancellable *cancellable,
858 GAsyncReadyCallback callback,
861 GLIB_AVAILABLE_IN_2_38
862 gboolean g_file_trash_finish (GFile *file,
863 GAsyncResult *result,
866 GLIB_AVAILABLE_IN_ALL
867 gboolean g_file_copy (GFile *source,
869 GFileCopyFlags flags,
870 GCancellable *cancellable,
871 GFileProgressCallback progress_callback,
872 gpointer progress_callback_data,
874 GLIB_AVAILABLE_IN_ALL
875 void g_file_copy_async (GFile *source,
877 GFileCopyFlags flags,
879 GCancellable *cancellable,
880 GFileProgressCallback progress_callback,
881 gpointer progress_callback_data,
882 GAsyncReadyCallback callback,
884 GLIB_AVAILABLE_IN_ALL
885 gboolean g_file_copy_finish (GFile *file,
888 GLIB_AVAILABLE_IN_ALL
889 gboolean g_file_move (GFile *source,
891 GFileCopyFlags flags,
892 GCancellable *cancellable,
893 GFileProgressCallback progress_callback,
894 gpointer progress_callback_data,
896 GLIB_AVAILABLE_IN_ALL
897 gboolean g_file_make_directory (GFile *file,
898 GCancellable *cancellable,
900 GLIB_AVAILABLE_IN_2_38
901 void g_file_make_directory_async (GFile *file,
903 GCancellable *cancellable,
904 GAsyncReadyCallback callback,
906 GLIB_AVAILABLE_IN_2_38
907 gboolean g_file_make_directory_finish (GFile *file,
908 GAsyncResult *result,
911 GLIB_AVAILABLE_IN_ALL
912 gboolean g_file_make_directory_with_parents (GFile *file,
913 GCancellable *cancellable,
915 GLIB_AVAILABLE_IN_ALL
916 gboolean g_file_make_symbolic_link (GFile *file,
917 const char *symlink_value,
918 GCancellable *cancellable,
920 GLIB_AVAILABLE_IN_ALL
921 GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
922 GCancellable *cancellable,
924 GLIB_AVAILABLE_IN_ALL
925 GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
926 GCancellable *cancellable,
928 GLIB_AVAILABLE_IN_ALL
929 gboolean g_file_set_attribute (GFile *file,
930 const char *attribute,
931 GFileAttributeType type,
933 GFileQueryInfoFlags flags,
934 GCancellable *cancellable,
936 GLIB_AVAILABLE_IN_ALL
937 gboolean g_file_set_attributes_from_info (GFile *file,
939 GFileQueryInfoFlags flags,
940 GCancellable *cancellable,
942 GLIB_AVAILABLE_IN_ALL
943 void g_file_set_attributes_async (GFile *file,
945 GFileQueryInfoFlags flags,
947 GCancellable *cancellable,
948 GAsyncReadyCallback callback,
950 GLIB_AVAILABLE_IN_ALL
951 gboolean g_file_set_attributes_finish (GFile *file,
952 GAsyncResult *result,
955 GLIB_AVAILABLE_IN_ALL
956 gboolean g_file_set_attribute_string (GFile *file,
957 const char *attribute,
959 GFileQueryInfoFlags flags,
960 GCancellable *cancellable,
962 GLIB_AVAILABLE_IN_ALL
963 gboolean g_file_set_attribute_byte_string (GFile *file,
964 const char *attribute,
966 GFileQueryInfoFlags flags,
967 GCancellable *cancellable,
969 GLIB_AVAILABLE_IN_ALL
970 gboolean g_file_set_attribute_uint32 (GFile *file,
971 const char *attribute,
973 GFileQueryInfoFlags flags,
974 GCancellable *cancellable,
976 GLIB_AVAILABLE_IN_ALL
977 gboolean g_file_set_attribute_int32 (GFile *file,
978 const char *attribute,
980 GFileQueryInfoFlags flags,
981 GCancellable *cancellable,
983 GLIB_AVAILABLE_IN_ALL
984 gboolean g_file_set_attribute_uint64 (GFile *file,
985 const char *attribute,
987 GFileQueryInfoFlags flags,
988 GCancellable *cancellable,
990 GLIB_AVAILABLE_IN_ALL
991 gboolean g_file_set_attribute_int64 (GFile *file,
992 const char *attribute,
994 GFileQueryInfoFlags flags,
995 GCancellable *cancellable,
997 GLIB_AVAILABLE_IN_ALL
998 void g_file_mount_enclosing_volume (GFile *location,
999 GMountMountFlags flags,
1000 GMountOperation *mount_operation,
1001 GCancellable *cancellable,
1002 GAsyncReadyCallback callback,
1003 gpointer user_data);
1004 GLIB_AVAILABLE_IN_ALL
1005 gboolean g_file_mount_enclosing_volume_finish (GFile *location,
1006 GAsyncResult *result,
1008 GLIB_AVAILABLE_IN_ALL
1009 void g_file_mount_mountable (GFile *file,
1010 GMountMountFlags flags,
1011 GMountOperation *mount_operation,
1012 GCancellable *cancellable,
1013 GAsyncReadyCallback callback,
1014 gpointer user_data);
1015 GLIB_AVAILABLE_IN_ALL
1016 GFile * g_file_mount_mountable_finish (GFile *file,
1017 GAsyncResult *result,
1019 GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation)
1020 void g_file_unmount_mountable (GFile *file,
1021 GMountUnmountFlags flags,
1022 GCancellable *cancellable,
1023 GAsyncReadyCallback callback,
1024 gpointer user_data);
1026 GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation_finish)
1027 gboolean g_file_unmount_mountable_finish (GFile *file,
1028 GAsyncResult *result,
1030 GLIB_AVAILABLE_IN_ALL
1031 void g_file_unmount_mountable_with_operation (GFile *file,
1032 GMountUnmountFlags flags,
1033 GMountOperation *mount_operation,
1034 GCancellable *cancellable,
1035 GAsyncReadyCallback callback,
1036 gpointer user_data);
1037 GLIB_AVAILABLE_IN_ALL
1038 gboolean g_file_unmount_mountable_with_operation_finish (GFile *file,
1039 GAsyncResult *result,
1041 GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation)
1042 void g_file_eject_mountable (GFile *file,
1043 GMountUnmountFlags flags,
1044 GCancellable *cancellable,
1045 GAsyncReadyCallback callback,
1046 gpointer user_data);
1048 GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation_finish)
1049 gboolean g_file_eject_mountable_finish (GFile *file,
1050 GAsyncResult *result,
1052 GLIB_AVAILABLE_IN_ALL
1053 void g_file_eject_mountable_with_operation (GFile *file,
1054 GMountUnmountFlags flags,
1055 GMountOperation *mount_operation,
1056 GCancellable *cancellable,
1057 GAsyncReadyCallback callback,
1058 gpointer user_data);
1059 GLIB_AVAILABLE_IN_ALL
1060 gboolean g_file_eject_mountable_with_operation_finish (GFile *file,
1061 GAsyncResult *result,
1064 GLIB_AVAILABLE_IN_ALL
1065 gboolean g_file_copy_attributes (GFile *source,
1067 GFileCopyFlags flags,
1068 GCancellable *cancellable,
1072 GLIB_AVAILABLE_IN_ALL
1073 GFileMonitor* g_file_monitor_directory (GFile *file,
1074 GFileMonitorFlags flags,
1075 GCancellable *cancellable,
1077 GLIB_AVAILABLE_IN_ALL
1078 GFileMonitor* g_file_monitor_file (GFile *file,
1079 GFileMonitorFlags flags,
1080 GCancellable *cancellable,
1082 GLIB_AVAILABLE_IN_ALL
1083 GFileMonitor* g_file_monitor (GFile *file,
1084 GFileMonitorFlags flags,
1085 GCancellable *cancellable,
1088 GLIB_AVAILABLE_IN_ALL
1089 void g_file_start_mountable (GFile *file,
1090 GDriveStartFlags flags,
1091 GMountOperation *start_operation,
1092 GCancellable *cancellable,
1093 GAsyncReadyCallback callback,
1094 gpointer user_data);
1095 GLIB_AVAILABLE_IN_ALL
1096 gboolean g_file_start_mountable_finish (GFile *file,
1097 GAsyncResult *result,
1099 GLIB_AVAILABLE_IN_ALL
1100 void g_file_stop_mountable (GFile *file,
1101 GMountUnmountFlags flags,
1102 GMountOperation *mount_operation,
1103 GCancellable *cancellable,
1104 GAsyncReadyCallback callback,
1105 gpointer user_data);
1106 GLIB_AVAILABLE_IN_ALL
1107 gboolean g_file_stop_mountable_finish (GFile *file,
1108 GAsyncResult *result,
1111 GLIB_AVAILABLE_IN_ALL
1112 void g_file_poll_mountable (GFile *file,
1113 GCancellable *cancellable,
1114 GAsyncReadyCallback callback,
1115 gpointer user_data);
1116 GLIB_AVAILABLE_IN_ALL
1117 gboolean g_file_poll_mountable_finish (GFile *file,
1118 GAsyncResult *result,
1123 GLIB_AVAILABLE_IN_ALL
1124 GAppInfo *g_file_query_default_handler (GFile *file,
1125 GCancellable *cancellable,
1127 GLIB_AVAILABLE_IN_ALL
1128 gboolean g_file_load_contents (GFile *file,
1129 GCancellable *cancellable,
1134 GLIB_AVAILABLE_IN_ALL
1135 void g_file_load_contents_async (GFile *file,
1136 GCancellable *cancellable,
1137 GAsyncReadyCallback callback,
1138 gpointer user_data);
1139 GLIB_AVAILABLE_IN_ALL
1140 gboolean g_file_load_contents_finish (GFile *file,
1146 GLIB_AVAILABLE_IN_ALL
1147 void g_file_load_partial_contents_async (GFile *file,
1148 GCancellable *cancellable,
1149 GFileReadMoreCallback read_more_callback,
1150 GAsyncReadyCallback callback,
1151 gpointer user_data);
1152 GLIB_AVAILABLE_IN_ALL
1153 gboolean g_file_load_partial_contents_finish (GFile *file,
1159 GLIB_AVAILABLE_IN_ALL
1160 gboolean g_file_replace_contents (GFile *file,
1161 const char *contents,
1164 gboolean make_backup,
1165 GFileCreateFlags flags,
1167 GCancellable *cancellable,
1169 GLIB_AVAILABLE_IN_ALL
1170 void g_file_replace_contents_async (GFile *file,
1171 const char *contents,
1174 gboolean make_backup,
1175 GFileCreateFlags flags,
1176 GCancellable *cancellable,
1177 GAsyncReadyCallback callback,
1178 gpointer user_data);
1179 GLIB_AVAILABLE_IN_ALL
1180 gboolean g_file_replace_contents_finish (GFile *file,
1185 GLIB_AVAILABLE_IN_ALL
1186 gboolean g_file_supports_thread_contexts (GFile *file);
1190 #endif /* __G_FILE_H__ */