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 #include <glib-object.h>
27 #include <gio/gfileinfo.h>
28 #include <gio/gfileenumerator.h>
29 #include <gio/gfileinputstream.h>
30 #include <gio/gfileoutputstream.h>
31 #include <gio/gmountoperation.h>
35 #define G_TYPE_FILE (g_file_get_type ())
36 #define G_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE, GFile))
37 #define G_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE))
38 #define G_FILE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE, GFileIface))
41 * GFileQueryInfoFlags:
42 * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
44 * Flags used when querying a #GFileInfo.
47 G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1<<0)
48 } GFileQueryInfoFlags;
52 * @G_FILE_CREATE_FLAGS_NONE: No flags set.
53 * @G_FILE_CREATE_FLAGS_PRIVATE: Create a file that can only be
54 * accessed by the current user.
56 * Flags used when an operation may create a file.
59 G_FILE_CREATE_FLAGS_NONE = 0,
60 G_FILE_CREATE_FLAGS_PRIVATE = (1<<0)
65 * @G_FILE_COPY_FLAGS_NONE: No flags set.
66 * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
67 * @G_FILE_COPY_BACKUP: Make a backup of any existing files. TODO: explain backup naming scheme.
68 * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
69 * @G_FILE_COPY_ALL_METADATA: Copy all file metadata (see #GFileInfo).
71 * Flags used when copying or moving files.
74 G_FILE_COPY_FLAGS_NONE = 0,
75 G_FILE_COPY_OVERWRITE = (1<<0),
76 G_FILE_COPY_BACKUP = (1<<1),
77 G_FILE_COPY_NOFOLLOW_SYMLINKS = (1<<2),
78 G_FILE_COPY_ALL_METADATA = (1<<3)
83 * @G_FILE_MONITOR_FLAGS_NONE: No flags set.
84 * @G_FILE_MONITOR_FLAGS_MONITOR_MOUNTS: Watch for mount events.
86 * Flags used to set what a #GFileMonitor or #GDirectoryMonitor will watch for.
89 G_FILE_MONITOR_FLAGS_NONE = 0,
90 G_FILE_MONITOR_FLAGS_MONITOR_MOUNTS = (1<<0)
96 * A handle to an object implementing the #GFileIface interface.
97 * Generally stores a location within the file system. Handles do not
98 * necessarily represent files or directories that currently exist.
100 typedef struct _GFile GFile; /* Dummy typedef */
101 typedef struct _GFileIface GFileIface;
102 typedef struct _GDirectoryMonitor GDirectoryMonitor;
103 typedef struct _GFileMonitor GFileMonitor;
108 * A handle to an object implementing the #GVolumeIface interface.
110 typedef struct _GVolume GVolume; /* Dummy typedef */
113 * GFileProgressCallback:
114 * @current_num_bytes: the current number of bytes in the operation.
115 * @total_num_bytes: the total number of bytes in the operation.
116 * @user_data: user data passed to the callback.
118 * When doing file operations that may take a while, such as moving
119 * a file or copying a file, a progress callback is used to pass how
120 * far along that operation is to the application.
122 typedef void (*GFileProgressCallback) (goffset current_num_bytes,
123 goffset total_num_bytes,
127 * GFileReadMoreCallback:
134 typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
136 gpointer callback_data);
140 * @g_iface: The parent interface.
141 * @dup: Duplicates a #GFile.
142 * @hash: Creates a hash of a #GFile.
143 * @equal: Checks equality of two given #GFile<!-- -->s.
144 * @is_native: Checks to see if a file is native to the system.
145 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
146 * @get_uri_scheme: Gets the URI scheme for a #GFile.
147 * @get_basename: Gets the basename for a given #GFile.
148 * @get_path: Gets the current path within a #GFile.
149 * @get_uri: Gets a URI for the path within a #GFile.
150 * @get_parse_name: Gets the parsed name for the #GFile.
151 * @get_parent: Gets the parent directory for the #GFile.
152 * @contains_file: Checks whether a #GFile contains a specified file.
153 * @get_relative_path: Gets the path for a #GFile relative to a given path.
154 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
155 * @get_child_for_display_name: Gets the child #GFile for a given display name.
156 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
157 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
158 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
159 * @query_info: Gets the #GFileInfo for a #GFile.
160 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
161 * @query_info_finish: Finishes an asynchronous query info operation.
162 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
163 * @_query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
164 * @_query_filesystem_info_finish: Finishes asynchronously getting the file system info.
165 * @find_enclosing_volume: Gets a #GVolume for the #GFile.
166 * @find_enclosing_volume_async: Asynchronously gets the #GVolume for a #GFile.
167 * @find_enclosing_volume_finish: Finishes asynchronously getting the volume.
168 * @set_display_name: Sets the display name for a #GFile.
169 * @set_display_name_async: Asynchronously sets a #GFile's display name.
170 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
171 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
172 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
173 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
174 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
175 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
176 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
177 * @set_attribute: Sets a #GFileAttribute.
178 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
179 * @set_attributes_async: Asynchronously sets a file's attributes.
180 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
181 * @read: Reads a file asynchronously.
182 * @read_async: Asynchronously reads a file.
183 * @read_finish: Finishes asynchronously reading a file.
184 * @append_to: Writes to the end of a file.
185 * @append_to_async: Asynchronously writes to the end of a file.
186 * @append_to_finish: Finishes an asynchronous file append operation.
187 * @create: Creates a new file.
188 * @create_async: Asynchronously creates a file.
189 * @create_finish: Finishes asynchronously creating a file.
190 * @replace: Replaces the contents of a file.
191 * @replace_async: Asynchronously replaces the contents of a file.
192 * @replace_finish: Finishes asynchronously replacing a file.
193 * @delete_file: Deletes a file.
194 * @_delete_file_async: Asynchronously deletes a file.
195 * @_delete_file_finish: Finishes an asynchronous delete.
196 * @trash: Sends a #GFile to the Trash location.
197 * @_trash_async: Asynchronously sends a #GFile to the Trash location.
198 * @_trash_finish: Finishes an asynchronous file trashing operation.
199 * @make_directory: Makes a directory.
200 * @_make_directory_async: Asynchronously makes a directory.
201 * @_make_directory_finish: Finishes making a directory asynchronously.
202 * @make_symbolic_link: Makes a symbolic link.
203 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
204 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
205 * @copy: Copies a file.
206 * @_copy_async: Asynchronously copies a file.
207 * @_copy_finish: Finishes an asynchronous copy operation.
208 * @move: Moves a file.
209 * @_move_async: Asynchronously moves a file.
210 * @_move_finish: Finishes an asynchronous move operation.
211 * @mount_mountable: Mounts a mountable object.
212 * @mount_mountable_finish: Finishes a mounting operation.
213 * @unmount_mountable: Unmounts a mountable object.
214 * @unmount_mountable_finish: Finishes an unmount operation.
215 * @eject_mountable: Ejects a mountable.
216 * @eject_mountable_finish: Finishes an eject operation.
217 * @mount_for_location: Mounts a specified location.
218 * @mount_for_location_finish: Finishes mounting a specified location.
219 * @monitor_dir: Creates a #GDirectoryMonitor for the location.
220 * @monitor_file: Creates a #GFileMonitor for the location.
222 * An interface for writing VFS file handles.
226 GTypeInterface g_iface;
230 GFile * (*dup) (GFile *file);
231 guint (*hash) (GFile *file);
232 gboolean (*equal) (GFile *file1,
234 gboolean (*is_native) (GFile *file);
235 gboolean (*has_uri_scheme) (GFile *file,
236 const char *uri_scheme);
237 char * (*get_uri_scheme) (GFile *file);
238 char * (*get_basename) (GFile *file);
239 char * (*get_path) (GFile *file);
240 char * (*get_uri) (GFile *file);
241 char * (*get_parse_name) (GFile *file);
242 GFile * (*get_parent) (GFile *file);
243 gboolean (*contains_file) (GFile *parent,
245 char * (*get_relative_path) (GFile *parent,
247 GFile * (*resolve_relative_path) (GFile *file,
248 const char *relative_path);
249 GFile * (*get_child_for_display_name) (GFile *file,
250 const char *display_name,
253 GFileEnumerator * (*enumerate_children) (GFile *file,
254 const char *attributes,
255 GFileQueryInfoFlags flags,
256 GCancellable *cancellable,
258 void (*enumerate_children_async) (GFile *file,
259 const char *attributes,
260 GFileQueryInfoFlags flags,
262 GCancellable *cancellable,
263 GAsyncReadyCallback callback,
265 GFileEnumerator * (*enumerate_children_finish) (GFile *file,
269 GFileInfo * (*query_info) (GFile *file,
270 const char *attributes,
271 GFileQueryInfoFlags flags,
272 GCancellable *cancellable,
274 void (*query_info_async) (GFile *file,
275 const char *attributes,
276 GFileQueryInfoFlags flags,
278 GCancellable *cancellable,
279 GAsyncReadyCallback callback,
281 GFileInfo * (*query_info_finish) (GFile *file,
285 GFileInfo * (*query_filesystem_info)(GFile *file,
286 const char *attributes,
287 GCancellable *cancellable,
289 void (*_query_filesystem_info_async) (void);
290 void (*_query_filesystem_info_finish) (void);
292 GVolume * (*find_enclosing_volume)(GFile *file,
293 GCancellable *cancellable,
295 void (*find_enclosing_volume_async)(GFile *file,
297 GCancellable *cancellable,
298 GAsyncReadyCallback callback,
300 GVolume * (*find_enclosing_volume_finish)(GFile *file,
304 GFile * (*set_display_name) (GFile *file,
305 const char *display_name,
306 GCancellable *cancellable,
308 void (*set_display_name_async) (GFile *file,
309 const char *display_name,
311 GCancellable *cancellable,
312 GAsyncReadyCallback callback,
314 GFile * (*set_display_name_finish) (GFile *file,
318 GFileAttributeInfoList * (*query_settable_attributes) (GFile *file,
319 GCancellable *cancellable,
321 void (*_query_settable_attributes_async) (void);
322 void (*_query_settable_attributes_finish) (void);
324 GFileAttributeInfoList * (*query_writable_namespaces) (GFile *file,
325 GCancellable *cancellable,
327 void (*_query_writable_namespaces_async) (void);
328 void (*_query_writable_namespaces_finish) (void);
330 gboolean (*set_attribute) (GFile *file,
331 const char *attribute,
332 const GFileAttributeValue *value,
333 GFileQueryInfoFlags flags,
334 GCancellable *cancellable,
336 gboolean (*set_attributes_from_info) (GFile *file,
338 GFileQueryInfoFlags flags,
339 GCancellable *cancellable,
341 void (*set_attributes_async) (GFile *file,
343 GFileQueryInfoFlags flags,
345 GCancellable *cancellable,
346 GAsyncReadyCallback callback,
348 gboolean (*set_attributes_finish) (GFile *file,
349 GAsyncResult *result,
353 GFileInputStream * (*read) (GFile *file,
354 GCancellable *cancellable,
356 void (*read_async) (GFile *file,
358 GCancellable *cancellable,
359 GAsyncReadyCallback callback,
361 GFileInputStream * (*read_finish) (GFile *file,
365 GFileOutputStream * (*append_to) (GFile *file,
366 GFileCreateFlags flags,
367 GCancellable *cancellable,
369 void (*append_to_async) (GFile *file,
370 GFileCreateFlags flags,
372 GCancellable *cancellable,
373 GAsyncReadyCallback callback,
375 GFileOutputStream * (*append_to_finish) (GFile *file,
379 GFileOutputStream * (*create) (GFile *file,
380 GFileCreateFlags flags,
381 GCancellable *cancellable,
383 void (*create_async) (GFile *file,
384 GFileCreateFlags flags,
386 GCancellable *cancellable,
387 GAsyncReadyCallback callback,
389 GFileOutputStream * (*create_finish) (GFile *file,
393 GFileOutputStream * (*replace) (GFile *file,
395 gboolean make_backup,
396 GFileCreateFlags flags,
397 GCancellable *cancellable,
399 void (*replace_async) (GFile *file,
401 gboolean make_backup,
402 GFileCreateFlags flags,
404 GCancellable *cancellable,
405 GAsyncReadyCallback callback,
407 GFileOutputStream * (*replace_finish) (GFile *file,
411 gboolean (*delete_file) (GFile *file,
412 GCancellable *cancellable,
414 void (*_delete_file_async) (void);
415 void (*_delete_file_finish) (void);
417 gboolean (*trash) (GFile *file,
418 GCancellable *cancellable,
420 void (*_trash_async) (void);
421 void (*_trash_finish) (void);
423 gboolean (*make_directory) (GFile *file,
424 GCancellable *cancellable,
426 void (*_make_directory_async) (void);
427 void (*_make_directory_finish) (void);
429 gboolean (*make_symbolic_link) (GFile *file,
430 const char *symlink_value,
431 GCancellable *cancellable,
433 void (*_make_symbolic_link_async) (void);
434 void (*_make_symbolic_link_finish) (void);
436 gboolean (*copy) (GFile *source,
438 GFileCopyFlags flags,
439 GCancellable *cancellable,
440 GFileProgressCallback progress_callback,
441 gpointer progress_callback_data,
443 void (*_copy_async) (void);
444 void (*_copy_finish) (void);
446 gboolean (*move) (GFile *source,
448 GFileCopyFlags flags,
449 GCancellable *cancellable,
450 GFileProgressCallback progress_callback,
451 gpointer progress_callback_data,
454 void (*_move_async) (void);
455 void (*_move_finish) (void);
458 void (*mount_mountable) (GFile *file,
459 GMountOperation *mount_operation,
460 GCancellable *cancellable,
461 GAsyncReadyCallback callback,
463 GFile * (*mount_mountable_finish) (GFile *file,
464 GAsyncResult *result,
466 void (*unmount_mountable) (GFile *file,
467 GCancellable *cancellable,
468 GAsyncReadyCallback callback,
470 gboolean (*unmount_mountable_finish) (GFile *file,
471 GAsyncResult *result,
473 void (*eject_mountable) (GFile *file,
474 GCancellable *cancellable,
475 GAsyncReadyCallback callback,
477 gboolean (*eject_mountable_finish) (GFile *file,
478 GAsyncResult *result,
482 void (*mount_for_location) (GFile *location,
483 GMountOperation *mount_operation,
484 GCancellable *cancellable,
485 GAsyncReadyCallback callback,
487 gboolean (*mount_for_location_finish) (GFile *location,
488 GAsyncResult *result,
491 GDirectoryMonitor* (*monitor_dir) (GFile *file,
492 GFileMonitorFlags flags,
493 GCancellable *cancellable);
495 GFileMonitor* (*monitor_file) (GFile *file,
496 GFileMonitorFlags flags,
497 GCancellable *cancellable);
501 GType g_file_get_type (void) G_GNUC_CONST;
503 GFile * g_file_new_for_path (const char *path);
504 GFile * g_file_new_for_uri (const char *uri);
505 GFile * g_file_new_for_commandline_arg (const char *arg);
506 GFile * g_file_parse_name (const char *parse_name);
507 GFile * g_file_dup (GFile *file);
508 guint g_file_hash (gconstpointer file);
509 gboolean g_file_equal (GFile *file1,
511 char * g_file_get_basename (GFile *file);
512 char * g_file_get_path (GFile *file);
513 char * g_file_get_uri (GFile *file);
514 char * g_file_get_parse_name (GFile *file);
515 GFile * g_file_get_parent (GFile *file);
516 GFile * g_file_get_child (GFile *file,
518 GFile * g_file_get_child_for_display_name (GFile *file,
519 const char *display_name,
521 gboolean g_file_contains_file (GFile *parent,
523 char * g_file_get_relative_path (GFile *parent,
525 GFile * g_file_resolve_relative_path (GFile *file,
526 const char *relative_path);
527 gboolean g_file_is_native (GFile *file);
528 gboolean g_file_has_uri_scheme (GFile *file,
529 const char *uri_scheme);
530 char * g_file_get_uri_scheme (GFile *file);
531 GFileInputStream * g_file_read (GFile *file,
532 GCancellable *cancellable,
534 void g_file_read_async (GFile *file,
536 GCancellable *cancellable,
537 GAsyncReadyCallback callback,
539 GFileInputStream * g_file_read_finish (GFile *file,
542 GFileOutputStream * g_file_append_to (GFile *file,
543 GFileCreateFlags flags,
544 GCancellable *cancellable,
546 GFileOutputStream * g_file_create (GFile *file,
547 GFileCreateFlags flags,
548 GCancellable *cancellable,
550 GFileOutputStream * g_file_replace (GFile *file,
552 gboolean make_backup,
553 GFileCreateFlags flags,
554 GCancellable *cancellable,
556 void g_file_append_to_async (GFile *file,
557 GFileCreateFlags flags,
559 GCancellable *cancellable,
560 GAsyncReadyCallback callback,
562 GFileOutputStream * g_file_append_to_finish (GFile *file,
565 void g_file_create_async (GFile *file,
566 GFileCreateFlags flags,
568 GCancellable *cancellable,
569 GAsyncReadyCallback callback,
571 GFileOutputStream * g_file_create_finish (GFile *file,
574 void g_file_replace_async (GFile *file,
576 gboolean make_backup,
577 GFileCreateFlags flags,
579 GCancellable *cancellable,
580 GAsyncReadyCallback callback,
582 GFileOutputStream * g_file_replace_finish (GFile *file,
585 GFileInfo * g_file_query_info (GFile *file,
586 const char *attributes,
587 GFileQueryInfoFlags flags,
588 GCancellable *cancellable,
590 void g_file_query_info_async (GFile *file,
591 const char *attributes,
592 GFileQueryInfoFlags flags,
594 GCancellable *cancellable,
595 GAsyncReadyCallback callback,
597 GFileInfo * g_file_query_info_finish (GFile *file,
600 GFileInfo * g_file_query_filesystem_info (GFile *file,
601 const char *attributes,
602 GCancellable *cancellable,
604 GVolume * g_file_find_enclosing_volume (GFile *file,
605 GCancellable *cancellable,
607 GFileEnumerator * g_file_enumerate_children (GFile *file,
608 const char *attributes,
609 GFileQueryInfoFlags flags,
610 GCancellable *cancellable,
612 void g_file_enumerate_children_async (GFile *file,
613 const char *attributes,
614 GFileQueryInfoFlags flags,
616 GCancellable *cancellable,
617 GAsyncReadyCallback callback,
619 GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
622 GFile * g_file_set_display_name (GFile *file,
623 const char *display_name,
624 GCancellable *cancellable,
626 void g_file_set_display_name_async (GFile *file,
627 const char *display_name,
629 GCancellable *cancellable,
630 GAsyncReadyCallback callback,
632 GFile * g_file_set_display_name_finish (GFile *file,
635 gboolean g_file_delete (GFile *file,
636 GCancellable *cancellable,
638 gboolean g_file_trash (GFile *file,
639 GCancellable *cancellable,
641 gboolean g_file_copy (GFile *source,
643 GFileCopyFlags flags,
644 GCancellable *cancellable,
645 GFileProgressCallback progress_callback,
646 gpointer progress_callback_data,
648 gboolean g_file_move (GFile *source,
650 GFileCopyFlags flags,
651 GCancellable *cancellable,
652 GFileProgressCallback progress_callback,
653 gpointer progress_callback_data,
655 gboolean g_file_make_directory (GFile *file,
656 GCancellable *cancellable,
658 gboolean g_file_make_symbolic_link (GFile *file,
659 const char *symlink_value,
660 GCancellable *cancellable,
662 GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
663 GCancellable *cancellable,
665 GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
666 GCancellable *cancellable,
668 gboolean g_file_set_attribute (GFile *file,
669 const char *attribute,
670 const GFileAttributeValue *value,
671 GFileQueryInfoFlags flags,
672 GCancellable *cancellable,
674 gboolean g_file_set_attributes_from_info (GFile *file,
676 GFileQueryInfoFlags flags,
677 GCancellable *cancellable,
679 void g_file_set_attributes_async (GFile *file,
681 GFileQueryInfoFlags flags,
683 GCancellable *cancellable,
684 GAsyncReadyCallback callback,
686 gboolean g_file_set_attributes_finish (GFile *file,
687 GAsyncResult *result,
690 gboolean g_file_set_attribute_string (GFile *file,
691 const char *attribute,
693 GFileQueryInfoFlags flags,
694 GCancellable *cancellable,
696 gboolean g_file_set_attribute_byte_string (GFile *file,
697 const char *attribute,
699 GFileQueryInfoFlags flags,
700 GCancellable *cancellable,
702 gboolean g_file_set_attribute_uint32 (GFile *file,
703 const char *attribute,
705 GFileQueryInfoFlags flags,
706 GCancellable *cancellable,
708 gboolean g_file_set_attribute_int32 (GFile *file,
709 const char *attribute,
711 GFileQueryInfoFlags flags,
712 GCancellable *cancellable,
714 gboolean g_file_set_attribute_uint64 (GFile *file,
715 const char *attribute,
717 GFileQueryInfoFlags flags,
718 GCancellable *cancellable,
720 gboolean g_file_set_attribute_int64 (GFile *file,
721 const char *attribute,
723 GFileQueryInfoFlags flags,
724 GCancellable *cancellable,
726 void g_mount_for_location (GFile *location,
727 GMountOperation *mount_operation,
728 GCancellable *cancellable,
729 GAsyncReadyCallback callback,
731 gboolean g_mount_for_location_finish (GFile *location,
732 GAsyncResult *result,
734 void g_file_mount_mountable (GFile *file,
735 GMountOperation *mount_operation,
736 GCancellable *cancellable,
737 GAsyncReadyCallback callback,
739 GFile * g_file_mount_mountable_finish (GFile *file,
740 GAsyncResult *result,
742 void g_file_unmount_mountable (GFile *file,
743 GCancellable *cancellable,
744 GAsyncReadyCallback callback,
746 gboolean g_file_unmount_mountable_finish (GFile *file,
747 GAsyncResult *result,
749 void g_file_eject_mountable (GFile *file,
750 GCancellable *cancellable,
751 GAsyncReadyCallback callback,
753 gboolean g_file_eject_mountable_finish (GFile *file,
754 GAsyncResult *result,
757 gboolean g_file_copy_attributes (GFile *source,
759 GFileCopyFlags flags,
760 GCancellable *cancellable,
764 GDirectoryMonitor* g_file_monitor_directory (GFile *file,
765 GFileMonitorFlags flags,
766 GCancellable *cancellable);
767 GFileMonitor* g_file_monitor_file (GFile *file,
768 GFileMonitorFlags flags,
769 GCancellable *cancellable);
774 gboolean g_file_load_contents (GFile *file,
775 GCancellable *cancellable,
780 void g_file_load_contents_async (GFile *file,
781 GCancellable *cancellable,
782 GAsyncReadyCallback callback,
784 gboolean g_file_load_contents_finish (GFile *file,
790 void g_file_load_partial_contents_async (GFile *file,
791 GCancellable *cancellable,
792 GFileReadMoreCallback read_more_callback,
793 GAsyncReadyCallback callback,
795 gboolean g_file_load_partial_contents_finish (GFile *file,
801 gboolean g_file_replace_contents (GFile *file,
802 const char *contents,
805 gboolean make_backup,
806 GFileCreateFlags flags,
808 GCancellable *cancellable,
810 void g_file_replace_contents_async (GFile *file,
811 const char *contents,
814 gboolean make_backup,
815 GFileCreateFlags flags,
816 GCancellable *cancellable,
817 GAsyncReadyCallback callback,
819 gboolean g_file_replace_contents_finish (GFile *file,
826 #endif /* __G_FILE_H__ */