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) /*< nick=nofollow-symlinks >*/
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 instead of just default set (see #GFileInfo).
70 * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
72 * Flags used when copying or moving files.
75 G_FILE_COPY_FLAGS_NONE = 0, /*< nick=none >*/
76 G_FILE_COPY_OVERWRITE = (1<<0),
77 G_FILE_COPY_BACKUP = (1<<1),
78 G_FILE_COPY_NOFOLLOW_SYMLINKS = (1<<2),
79 G_FILE_COPY_ALL_METADATA = (1<<3),
80 G_FILE_COPY_NO_FALLBACK_FOR_MOVE = (1<<4)
85 * @G_FILE_MONITOR_FLAGS_NONE: No flags set.
86 * @G_FILE_MONITOR_FLAGS_MONITOR_MOUNTS: Watch for mount events.
88 * Flags used to set what a #GFileMonitor or #GDirectoryMonitor will watch for.
91 G_FILE_MONITOR_FLAGS_NONE = 0,
92 G_FILE_MONITOR_FLAGS_MONITOR_MOUNTS = (1<<0)
98 * A handle to an object implementing the #GFileIface interface.
99 * Generally stores a location within the file system. Handles do not
100 * necessarily represent files or directories that currently exist.
102 typedef struct _GFile GFile; /* Dummy typedef */
103 typedef struct _GFileIface GFileIface;
104 typedef struct _GDirectoryMonitor GDirectoryMonitor;
105 typedef struct _GFileMonitor GFileMonitor;
110 * A handle to an object implementing the #GVolumeIface interface.
112 typedef struct _GVolume GVolume; /* Dummy typedef */
115 * GFileProgressCallback:
116 * @current_num_bytes: the current number of bytes in the operation.
117 * @total_num_bytes: the total number of bytes in the operation.
118 * @user_data: user data passed to the callback.
120 * When doing file operations that may take a while, such as moving
121 * a file or copying a file, a progress callback is used to pass how
122 * far along that operation is to the application.
124 typedef void (*GFileProgressCallback) (goffset current_num_bytes,
125 goffset total_num_bytes,
129 * GFileReadMoreCallback:
136 typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
138 gpointer callback_data);
142 * @g_iface: The parent interface.
143 * @dup: Duplicates a #GFile.
144 * @hash: Creates a hash of a #GFile.
145 * @equal: Checks equality of two given #GFile<!-- -->s.
146 * @is_native: Checks to see if a file is native to the system.
147 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
148 * @get_uri_scheme: Gets the URI scheme for a #GFile.
149 * @get_basename: Gets the basename for a given #GFile.
150 * @get_path: Gets the current path within a #GFile.
151 * @get_uri: Gets a URI for the path within a #GFile.
152 * @get_parse_name: Gets the parsed name for the #GFile.
153 * @get_parent: Gets the parent directory for the #GFile.
154 * @contains_file: Checks whether a #GFile contains a specified file.
155 * @get_relative_path: Gets the path for a #GFile relative to a given path.
156 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
157 * @get_child_for_display_name: Gets the child #GFile for a given display name.
158 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
159 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
160 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
161 * @query_info: Gets the #GFileInfo for a #GFile.
162 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
163 * @query_info_finish: Finishes an asynchronous query info operation.
164 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
165 * @_query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
166 * @_query_filesystem_info_finish: Finishes asynchronously getting the file system info.
167 * @find_enclosing_volume: Gets a #GVolume for the #GFile.
168 * @find_enclosing_volume_async: Asynchronously gets the #GVolume for a #GFile.
169 * @find_enclosing_volume_finish: Finishes asynchronously getting the volume.
170 * @set_display_name: Sets the display name for a #GFile.
171 * @set_display_name_async: Asynchronously sets a #GFile's display name.
172 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
173 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
174 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
175 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
176 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
177 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
178 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
179 * @set_attribute: Sets a #GFileAttribute.
180 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
181 * @set_attributes_async: Asynchronously sets a file's attributes.
182 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
183 * @read: Reads a file asynchronously.
184 * @read_async: Asynchronously reads a file.
185 * @read_finish: Finishes asynchronously reading a file.
186 * @append_to: Writes to the end of a file.
187 * @append_to_async: Asynchronously writes to the end of a file.
188 * @append_to_finish: Finishes an asynchronous file append operation.
189 * @create: Creates a new file.
190 * @create_async: Asynchronously creates a file.
191 * @create_finish: Finishes asynchronously creating a file.
192 * @replace: Replaces the contents of a file.
193 * @replace_async: Asynchronously replaces the contents of a file.
194 * @replace_finish: Finishes asynchronously replacing a file.
195 * @delete_file: Deletes a file.
196 * @_delete_file_async: Asynchronously deletes a file.
197 * @_delete_file_finish: Finishes an asynchronous delete.
198 * @trash: Sends a #GFile to the Trash location.
199 * @_trash_async: Asynchronously sends a #GFile to the Trash location.
200 * @_trash_finish: Finishes an asynchronous file trashing operation.
201 * @make_directory: Makes a directory.
202 * @_make_directory_async: Asynchronously makes a directory.
203 * @_make_directory_finish: Finishes making a directory asynchronously.
204 * @make_symbolic_link: Makes a symbolic link.
205 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
206 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
207 * @copy: Copies a file.
208 * @_copy_async: Asynchronously copies a file.
209 * @_copy_finish: Finishes an asynchronous copy operation.
210 * @move: Moves a file.
211 * @_move_async: Asynchronously moves a file.
212 * @_move_finish: Finishes an asynchronous move operation.
213 * @mount_mountable: Mounts a mountable object.
214 * @mount_mountable_finish: Finishes a mounting operation.
215 * @unmount_mountable: Unmounts a mountable object.
216 * @unmount_mountable_finish: Finishes an unmount operation.
217 * @eject_mountable: Ejects a mountable.
218 * @eject_mountable_finish: Finishes an eject operation.
219 * @mount_for_location: Mounts a specified location.
220 * @mount_for_location_finish: Finishes mounting a specified location.
221 * @monitor_dir: Creates a #GDirectoryMonitor for the location.
222 * @monitor_file: Creates a #GFileMonitor for the location.
224 * An interface for writing VFS file handles.
228 GTypeInterface g_iface;
232 GFile * (*dup) (GFile *file);
233 guint (*hash) (GFile *file);
234 gboolean (*equal) (GFile *file1,
236 gboolean (*is_native) (GFile *file);
237 gboolean (*has_uri_scheme) (GFile *file,
238 const char *uri_scheme);
239 char * (*get_uri_scheme) (GFile *file);
240 char * (*get_basename) (GFile *file);
241 char * (*get_path) (GFile *file);
242 char * (*get_uri) (GFile *file);
243 char * (*get_parse_name) (GFile *file);
244 GFile * (*get_parent) (GFile *file);
245 gboolean (*contains_file) (GFile *parent,
247 char * (*get_relative_path) (GFile *parent,
249 GFile * (*resolve_relative_path) (GFile *file,
250 const char *relative_path);
251 GFile * (*get_child_for_display_name) (GFile *file,
252 const char *display_name,
255 GFileEnumerator * (*enumerate_children) (GFile *file,
256 const char *attributes,
257 GFileQueryInfoFlags flags,
258 GCancellable *cancellable,
260 void (*enumerate_children_async) (GFile *file,
261 const char *attributes,
262 GFileQueryInfoFlags flags,
264 GCancellable *cancellable,
265 GAsyncReadyCallback callback,
267 GFileEnumerator * (*enumerate_children_finish) (GFile *file,
271 GFileInfo * (*query_info) (GFile *file,
272 const char *attributes,
273 GFileQueryInfoFlags flags,
274 GCancellable *cancellable,
276 void (*query_info_async) (GFile *file,
277 const char *attributes,
278 GFileQueryInfoFlags flags,
280 GCancellable *cancellable,
281 GAsyncReadyCallback callback,
283 GFileInfo * (*query_info_finish) (GFile *file,
287 GFileInfo * (*query_filesystem_info)(GFile *file,
288 const char *attributes,
289 GCancellable *cancellable,
291 void (*_query_filesystem_info_async) (void);
292 void (*_query_filesystem_info_finish) (void);
294 GVolume * (*find_enclosing_volume)(GFile *file,
295 GCancellable *cancellable,
297 void (*find_enclosing_volume_async)(GFile *file,
299 GCancellable *cancellable,
300 GAsyncReadyCallback callback,
302 GVolume * (*find_enclosing_volume_finish)(GFile *file,
306 GFile * (*set_display_name) (GFile *file,
307 const char *display_name,
308 GCancellable *cancellable,
310 void (*set_display_name_async) (GFile *file,
311 const char *display_name,
313 GCancellable *cancellable,
314 GAsyncReadyCallback callback,
316 GFile * (*set_display_name_finish) (GFile *file,
320 GFileAttributeInfoList * (*query_settable_attributes) (GFile *file,
321 GCancellable *cancellable,
323 void (*_query_settable_attributes_async) (void);
324 void (*_query_settable_attributes_finish) (void);
326 GFileAttributeInfoList * (*query_writable_namespaces) (GFile *file,
327 GCancellable *cancellable,
329 void (*_query_writable_namespaces_async) (void);
330 void (*_query_writable_namespaces_finish) (void);
332 gboolean (*set_attribute) (GFile *file,
333 const char *attribute,
334 const GFileAttributeValue *value,
335 GFileQueryInfoFlags flags,
336 GCancellable *cancellable,
338 gboolean (*set_attributes_from_info) (GFile *file,
340 GFileQueryInfoFlags flags,
341 GCancellable *cancellable,
343 void (*set_attributes_async) (GFile *file,
345 GFileQueryInfoFlags flags,
347 GCancellable *cancellable,
348 GAsyncReadyCallback callback,
350 gboolean (*set_attributes_finish) (GFile *file,
351 GAsyncResult *result,
355 GFileInputStream * (*read) (GFile *file,
356 GCancellable *cancellable,
358 void (*read_async) (GFile *file,
360 GCancellable *cancellable,
361 GAsyncReadyCallback callback,
363 GFileInputStream * (*read_finish) (GFile *file,
367 GFileOutputStream * (*append_to) (GFile *file,
368 GFileCreateFlags flags,
369 GCancellable *cancellable,
371 void (*append_to_async) (GFile *file,
372 GFileCreateFlags flags,
374 GCancellable *cancellable,
375 GAsyncReadyCallback callback,
377 GFileOutputStream * (*append_to_finish) (GFile *file,
381 GFileOutputStream * (*create) (GFile *file,
382 GFileCreateFlags flags,
383 GCancellable *cancellable,
385 void (*create_async) (GFile *file,
386 GFileCreateFlags flags,
388 GCancellable *cancellable,
389 GAsyncReadyCallback callback,
391 GFileOutputStream * (*create_finish) (GFile *file,
395 GFileOutputStream * (*replace) (GFile *file,
397 gboolean make_backup,
398 GFileCreateFlags flags,
399 GCancellable *cancellable,
401 void (*replace_async) (GFile *file,
403 gboolean make_backup,
404 GFileCreateFlags flags,
406 GCancellable *cancellable,
407 GAsyncReadyCallback callback,
409 GFileOutputStream * (*replace_finish) (GFile *file,
413 gboolean (*delete_file) (GFile *file,
414 GCancellable *cancellable,
416 void (*_delete_file_async) (void);
417 void (*_delete_file_finish) (void);
419 gboolean (*trash) (GFile *file,
420 GCancellable *cancellable,
422 void (*_trash_async) (void);
423 void (*_trash_finish) (void);
425 gboolean (*make_directory) (GFile *file,
426 GCancellable *cancellable,
428 void (*_make_directory_async) (void);
429 void (*_make_directory_finish) (void);
431 gboolean (*make_symbolic_link) (GFile *file,
432 const char *symlink_value,
433 GCancellable *cancellable,
435 void (*_make_symbolic_link_async) (void);
436 void (*_make_symbolic_link_finish) (void);
438 gboolean (*copy) (GFile *source,
440 GFileCopyFlags flags,
441 GCancellable *cancellable,
442 GFileProgressCallback progress_callback,
443 gpointer progress_callback_data,
445 void (*_copy_async) (void);
446 void (*_copy_finish) (void);
448 gboolean (*move) (GFile *source,
450 GFileCopyFlags flags,
451 GCancellable *cancellable,
452 GFileProgressCallback progress_callback,
453 gpointer progress_callback_data,
456 void (*_move_async) (void);
457 void (*_move_finish) (void);
460 void (*mount_mountable) (GFile *file,
461 GMountOperation *mount_operation,
462 GCancellable *cancellable,
463 GAsyncReadyCallback callback,
465 GFile * (*mount_mountable_finish) (GFile *file,
466 GAsyncResult *result,
468 void (*unmount_mountable) (GFile *file,
469 GCancellable *cancellable,
470 GAsyncReadyCallback callback,
472 gboolean (*unmount_mountable_finish) (GFile *file,
473 GAsyncResult *result,
475 void (*eject_mountable) (GFile *file,
476 GCancellable *cancellable,
477 GAsyncReadyCallback callback,
479 gboolean (*eject_mountable_finish) (GFile *file,
480 GAsyncResult *result,
484 void (*mount_for_location) (GFile *location,
485 GMountOperation *mount_operation,
486 GCancellable *cancellable,
487 GAsyncReadyCallback callback,
489 gboolean (*mount_for_location_finish) (GFile *location,
490 GAsyncResult *result,
493 GDirectoryMonitor* (*monitor_dir) (GFile *file,
494 GFileMonitorFlags flags,
495 GCancellable *cancellable);
497 GFileMonitor* (*monitor_file) (GFile *file,
498 GFileMonitorFlags flags,
499 GCancellable *cancellable);
503 GType g_file_get_type (void) G_GNUC_CONST;
505 GFile * g_file_new_for_path (const char *path);
506 GFile * g_file_new_for_uri (const char *uri);
507 GFile * g_file_new_for_commandline_arg (const char *arg);
508 GFile * g_file_parse_name (const char *parse_name);
509 GFile * g_file_dup (GFile *file);
510 guint g_file_hash (gconstpointer file);
511 gboolean g_file_equal (GFile *file1,
513 char * g_file_get_basename (GFile *file);
514 char * g_file_get_path (GFile *file);
515 char * g_file_get_uri (GFile *file);
516 char * g_file_get_parse_name (GFile *file);
517 GFile * g_file_get_parent (GFile *file);
518 GFile * g_file_get_child (GFile *file,
520 GFile * g_file_get_child_for_display_name (GFile *file,
521 const char *display_name,
523 gboolean g_file_contains_file (GFile *parent,
525 char * g_file_get_relative_path (GFile *parent,
527 GFile * g_file_resolve_relative_path (GFile *file,
528 const char *relative_path);
529 gboolean g_file_is_native (GFile *file);
530 gboolean g_file_has_uri_scheme (GFile *file,
531 const char *uri_scheme);
532 char * g_file_get_uri_scheme (GFile *file);
533 GFileInputStream * g_file_read (GFile *file,
534 GCancellable *cancellable,
536 void g_file_read_async (GFile *file,
538 GCancellable *cancellable,
539 GAsyncReadyCallback callback,
541 GFileInputStream * g_file_read_finish (GFile *file,
544 GFileOutputStream * g_file_append_to (GFile *file,
545 GFileCreateFlags flags,
546 GCancellable *cancellable,
548 GFileOutputStream * g_file_create (GFile *file,
549 GFileCreateFlags flags,
550 GCancellable *cancellable,
552 GFileOutputStream * g_file_replace (GFile *file,
554 gboolean make_backup,
555 GFileCreateFlags flags,
556 GCancellable *cancellable,
558 void g_file_append_to_async (GFile *file,
559 GFileCreateFlags flags,
561 GCancellable *cancellable,
562 GAsyncReadyCallback callback,
564 GFileOutputStream * g_file_append_to_finish (GFile *file,
567 void g_file_create_async (GFile *file,
568 GFileCreateFlags flags,
570 GCancellable *cancellable,
571 GAsyncReadyCallback callback,
573 GFileOutputStream * g_file_create_finish (GFile *file,
576 void g_file_replace_async (GFile *file,
578 gboolean make_backup,
579 GFileCreateFlags flags,
581 GCancellable *cancellable,
582 GAsyncReadyCallback callback,
584 GFileOutputStream * g_file_replace_finish (GFile *file,
587 GFileInfo * g_file_query_info (GFile *file,
588 const char *attributes,
589 GFileQueryInfoFlags flags,
590 GCancellable *cancellable,
592 void g_file_query_info_async (GFile *file,
593 const char *attributes,
594 GFileQueryInfoFlags flags,
596 GCancellable *cancellable,
597 GAsyncReadyCallback callback,
599 GFileInfo * g_file_query_info_finish (GFile *file,
602 GFileInfo * g_file_query_filesystem_info (GFile *file,
603 const char *attributes,
604 GCancellable *cancellable,
606 GVolume * g_file_find_enclosing_volume (GFile *file,
607 GCancellable *cancellable,
609 GFileEnumerator * g_file_enumerate_children (GFile *file,
610 const char *attributes,
611 GFileQueryInfoFlags flags,
612 GCancellable *cancellable,
614 void g_file_enumerate_children_async (GFile *file,
615 const char *attributes,
616 GFileQueryInfoFlags flags,
618 GCancellable *cancellable,
619 GAsyncReadyCallback callback,
621 GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
624 GFile * g_file_set_display_name (GFile *file,
625 const char *display_name,
626 GCancellable *cancellable,
628 void g_file_set_display_name_async (GFile *file,
629 const char *display_name,
631 GCancellable *cancellable,
632 GAsyncReadyCallback callback,
634 GFile * g_file_set_display_name_finish (GFile *file,
637 gboolean g_file_delete (GFile *file,
638 GCancellable *cancellable,
640 gboolean g_file_trash (GFile *file,
641 GCancellable *cancellable,
643 gboolean g_file_copy (GFile *source,
645 GFileCopyFlags flags,
646 GCancellable *cancellable,
647 GFileProgressCallback progress_callback,
648 gpointer progress_callback_data,
650 gboolean g_file_move (GFile *source,
652 GFileCopyFlags flags,
653 GCancellable *cancellable,
654 GFileProgressCallback progress_callback,
655 gpointer progress_callback_data,
657 gboolean g_file_make_directory (GFile *file,
658 GCancellable *cancellable,
660 gboolean g_file_make_symbolic_link (GFile *file,
661 const char *symlink_value,
662 GCancellable *cancellable,
664 GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
665 GCancellable *cancellable,
667 GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
668 GCancellable *cancellable,
670 gboolean g_file_set_attribute (GFile *file,
671 const char *attribute,
672 const GFileAttributeValue *value,
673 GFileQueryInfoFlags flags,
674 GCancellable *cancellable,
676 gboolean g_file_set_attributes_from_info (GFile *file,
678 GFileQueryInfoFlags flags,
679 GCancellable *cancellable,
681 void g_file_set_attributes_async (GFile *file,
683 GFileQueryInfoFlags flags,
685 GCancellable *cancellable,
686 GAsyncReadyCallback callback,
688 gboolean g_file_set_attributes_finish (GFile *file,
689 GAsyncResult *result,
692 gboolean g_file_set_attribute_string (GFile *file,
693 const char *attribute,
695 GFileQueryInfoFlags flags,
696 GCancellable *cancellable,
698 gboolean g_file_set_attribute_byte_string (GFile *file,
699 const char *attribute,
701 GFileQueryInfoFlags flags,
702 GCancellable *cancellable,
704 gboolean g_file_set_attribute_uint32 (GFile *file,
705 const char *attribute,
707 GFileQueryInfoFlags flags,
708 GCancellable *cancellable,
710 gboolean g_file_set_attribute_int32 (GFile *file,
711 const char *attribute,
713 GFileQueryInfoFlags flags,
714 GCancellable *cancellable,
716 gboolean g_file_set_attribute_uint64 (GFile *file,
717 const char *attribute,
719 GFileQueryInfoFlags flags,
720 GCancellable *cancellable,
722 gboolean g_file_set_attribute_int64 (GFile *file,
723 const char *attribute,
725 GFileQueryInfoFlags flags,
726 GCancellable *cancellable,
728 void g_mount_for_location (GFile *location,
729 GMountOperation *mount_operation,
730 GCancellable *cancellable,
731 GAsyncReadyCallback callback,
733 gboolean g_mount_for_location_finish (GFile *location,
734 GAsyncResult *result,
736 void g_file_mount_mountable (GFile *file,
737 GMountOperation *mount_operation,
738 GCancellable *cancellable,
739 GAsyncReadyCallback callback,
741 GFile * g_file_mount_mountable_finish (GFile *file,
742 GAsyncResult *result,
744 void g_file_unmount_mountable (GFile *file,
745 GCancellable *cancellable,
746 GAsyncReadyCallback callback,
748 gboolean g_file_unmount_mountable_finish (GFile *file,
749 GAsyncResult *result,
751 void g_file_eject_mountable (GFile *file,
752 GCancellable *cancellable,
753 GAsyncReadyCallback callback,
755 gboolean g_file_eject_mountable_finish (GFile *file,
756 GAsyncResult *result,
759 gboolean g_file_copy_attributes (GFile *source,
761 GFileCopyFlags flags,
762 GCancellable *cancellable,
766 GDirectoryMonitor* g_file_monitor_directory (GFile *file,
767 GFileMonitorFlags flags,
768 GCancellable *cancellable);
769 GFileMonitor* g_file_monitor_file (GFile *file,
770 GFileMonitorFlags flags,
771 GCancellable *cancellable);
776 gboolean g_file_load_contents (GFile *file,
777 GCancellable *cancellable,
782 void g_file_load_contents_async (GFile *file,
783 GCancellable *cancellable,
784 GAsyncReadyCallback callback,
786 gboolean g_file_load_contents_finish (GFile *file,
792 void g_file_load_partial_contents_async (GFile *file,
793 GCancellable *cancellable,
794 GFileReadMoreCallback read_more_callback,
795 GAsyncReadyCallback callback,
797 gboolean g_file_load_partial_contents_finish (GFile *file,
803 gboolean g_file_replace_contents (GFile *file,
804 const char *contents,
807 gboolean make_backup,
808 GFileCreateFlags flags,
810 GCancellable *cancellable,
812 void g_file_replace_contents_async (GFile *file,
813 const char *contents,
816 gboolean make_backup,
817 GFileCreateFlags flags,
818 GCancellable *cancellable,
819 GAsyncReadyCallback callback,
821 gboolean g_file_replace_contents_finish (GFile *file,
828 #endif /* __G_FILE_H__ */