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_OVERWRITE: Overwrite any existing files
66 * @G_FILE_COPY_BACKUP: Make a backup of any existing files. TODO: explain backup naming scheme.
67 * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
68 * @G_FILE_COPY_ALL_METADATA: Copy all file metadata (see #GFileInfo).
70 * Flags used when copying or moving files.
73 G_FILE_COPY_OVERWRITE = (1<<0),
74 G_FILE_COPY_BACKUP = (1<<1),
75 G_FILE_COPY_NOFOLLOW_SYMLINKS = (1<<2),
76 G_FILE_COPY_ALL_METADATA = (1<<3)
81 * @G_FILE_MONITOR_FLAGS_NONE: No flags set.
82 * @G_FILE_MONITOR_FLAGS_MONITOR_MOUNTS: Watch for mount events.
84 * Flags used to set what a #GFileMonitor or #GDirectoryMonitor will watch for.
87 G_FILE_MONITOR_FLAGS_NONE = 0,
88 G_FILE_MONITOR_FLAGS_MONITOR_MOUNTS = (1<<0)
94 * A handle to an object implementing the #GFileIface interface.
95 * Generally stores a location within the file system. Handles do not
96 * necessarily represent files or directories that currently exist.
98 typedef struct _GFile GFile; /* Dummy typedef */
99 typedef struct _GFileIface GFileIface;
100 typedef struct _GDirectoryMonitor GDirectoryMonitor;
101 typedef struct _GFileMonitor GFileMonitor;
106 * A handle to an object implementing the #GVolumeIface interface.
108 typedef struct _GVolume GVolume; /* Dummy typedef */
111 * GFileProgressCallback:
112 * @current_num_bytes: the current number of bytes in the operation.
113 * @total_num_bytes: the total number of bytes in the operation.
114 * @user_data: user data passed to the callback.
116 * When doing file operations that may take a while, such as moving
117 * a file or copying a file, a progress callback is used to pass how
118 * far along that operation is to the application.
120 typedef void (*GFileProgressCallback) (goffset current_num_bytes,
121 goffset total_num_bytes,
125 * GFileReadMoreCallback:
132 typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
134 gpointer callback_data);
138 * @g_iface: The parent interface.
139 * @dup: Duplicates a #GFile.
140 * @hash: Creates a hash of a #GFile.
141 * @equal: Checks equality of two given #GFile<!-- -->s.
142 * @is_native: Checks to see if a file is native to the system.
143 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
144 * @get_uri_scheme: Gets the URI scheme for a #GFile.
145 * @get_basename: Gets the basename for a given #GFile.
146 * @get_path: Gets the current path within a #GFile.
147 * @get_uri: Gets a URI for the path within a #GFile.
148 * @get_parse_name: Gets the parsed name for the #GFile.
149 * @get_parent: Gets the parent directory for the #GFile.
150 * @contains_file: Checks whether a #GFile contains a specified file.
151 * @get_relative_path: Gets the path for a #GFile relative to a given path.
152 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
153 * @get_child_for_display_name: Gets the child #GFile for a given display name.
154 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
155 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
156 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
157 * @query_info: Gets the #GFileInfo for a #GFile.
158 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
159 * @query_info_finish: Finishes an asynchronous query info operation.
160 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
161 * @_query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
162 * @_query_filesystem_info_finish: Finishes asynchronously getting the file system info.
163 * @find_enclosing_volume: Gets a #GVolume for the #GFile.
164 * @find_enclosing_volume_async: Asynchronously gets the #GVolume for a #GFile.
165 * @find_enclosing_volume_finish: Finishes asynchronously getting the volume.
166 * @set_display_name: Sets the display name for a #GFile.
167 * @set_display_name_async: Asynchronously sets a #GFile's display name.
168 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
169 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
170 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
171 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
172 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
173 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
174 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
175 * @set_attribute: Sets a #GFileAttribute.
176 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
177 * @set_attributes_async: Asynchronously sets a file's attributes.
178 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
179 * @read: Reads a file asynchronously.
180 * @read_async: Asynchronously reads a file.
181 * @read_finish: Finishes asynchronously reading a file.
182 * @append_to: Writes to the end of a file.
183 * @append_to_async: Asynchronously writes to the end of a file.
184 * @append_to_finish: Finishes an asynchronous file append operation.
185 * @create: Creates a new file.
186 * @create_async: Asynchronously creates a file.
187 * @create_finish: Finishes asynchronously creating a file.
188 * @replace: Replaces the contents of a file.
189 * @replace_async: Asynchronously replaces the contents of a file.
190 * @replace_finish: Finishes asynchronously replacing a file.
191 * @delete_file: Deletes a file.
192 * @_delete_file_async: Asynchronously deletes a file.
193 * @_delete_file_finish: Finishes an asynchronous delete.
194 * @trash: Sends a #GFile to the Trash location.
195 * @_trash_async: Asynchronously sends a #GFile to the Trash location.
196 * @_trash_finish: Finishes an asynchronous file trashing operation.
197 * @make_directory: Makes a directory.
198 * @_make_directory_async: Asynchronously makes a directory.
199 * @_make_directory_finish: Finishes making a directory asynchronously.
200 * @make_symbolic_link: Makes a symbolic link.
201 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
202 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
203 * @copy: Copies a file.
204 * @_copy_async: Asynchronously copies a file.
205 * @_copy_finish: Finishes an asynchronous copy operation.
206 * @move: Moves a file.
207 * @_move_async: Asynchronously moves a file.
208 * @_move_finish: Finishes an asynchronous move operation.
209 * @mount_mountable: Mounts a mountable object.
210 * @mount_mountable_finish: Finishes a mounting operation.
211 * @unmount_mountable: Unmounts a mountable object.
212 * @unmount_mountable_finish: Finishes an unmount operation.
213 * @eject_mountable: Ejects a mountable.
214 * @eject_mountable_finish: Finishes an eject operation.
215 * @mount_for_location: Mounts a specified location.
216 * @mount_for_location_finish: Finishes mounting a specified location.
217 * @monitor_dir: Creates a #GDirectoryMonitor for the location.
218 * @monitor_file: Creates a #GFileMonitor for the location.
220 * An interface for writing VFS file handles.
224 GTypeInterface g_iface;
228 GFile * (*dup) (GFile *file);
229 guint (*hash) (GFile *file);
230 gboolean (*equal) (GFile *file1,
232 gboolean (*is_native) (GFile *file);
233 gboolean (*has_uri_scheme) (GFile *file,
234 const char *uri_scheme);
235 char * (*get_uri_scheme) (GFile *file);
236 char * (*get_basename) (GFile *file);
237 char * (*get_path) (GFile *file);
238 char * (*get_uri) (GFile *file);
239 char * (*get_parse_name) (GFile *file);
240 GFile * (*get_parent) (GFile *file);
241 gboolean (*contains_file) (GFile *parent,
243 char * (*get_relative_path) (GFile *parent,
245 GFile * (*resolve_relative_path) (GFile *file,
246 const char *relative_path);
247 GFile * (*get_child_for_display_name) (GFile *file,
248 const char *display_name,
251 GFileEnumerator * (*enumerate_children) (GFile *file,
252 const char *attributes,
253 GFileQueryInfoFlags flags,
254 GCancellable *cancellable,
256 void (*enumerate_children_async) (GFile *file,
257 const char *attributes,
258 GFileQueryInfoFlags flags,
260 GCancellable *cancellable,
261 GAsyncReadyCallback callback,
263 GFileEnumerator * (*enumerate_children_finish) (GFile *file,
267 GFileInfo * (*query_info) (GFile *file,
268 const char *attributes,
269 GFileQueryInfoFlags flags,
270 GCancellable *cancellable,
272 void (*query_info_async) (GFile *file,
273 const char *attributes,
274 GFileQueryInfoFlags flags,
276 GCancellable *cancellable,
277 GAsyncReadyCallback callback,
279 GFileInfo * (*query_info_finish) (GFile *file,
283 GFileInfo * (*query_filesystem_info)(GFile *file,
284 const char *attributes,
285 GCancellable *cancellable,
287 void (*_query_filesystem_info_async) (void);
288 void (*_query_filesystem_info_finish) (void);
290 GVolume * (*find_enclosing_volume)(GFile *file,
291 GCancellable *cancellable,
293 void (*find_enclosing_volume_async)(GFile *file,
295 GCancellable *cancellable,
296 GAsyncReadyCallback callback,
298 GVolume * (*find_enclosing_volume_finish)(GFile *file,
302 GFile * (*set_display_name) (GFile *file,
303 const char *display_name,
304 GCancellable *cancellable,
306 void (*set_display_name_async) (GFile *file,
307 const char *display_name,
309 GCancellable *cancellable,
310 GAsyncReadyCallback callback,
312 GFile * (*set_display_name_finish) (GFile *file,
316 GFileAttributeInfoList * (*query_settable_attributes) (GFile *file,
317 GCancellable *cancellable,
319 void (*_query_settable_attributes_async) (void);
320 void (*_query_settable_attributes_finish) (void);
322 GFileAttributeInfoList * (*query_writable_namespaces) (GFile *file,
323 GCancellable *cancellable,
325 void (*_query_writable_namespaces_async) (void);
326 void (*_query_writable_namespaces_finish) (void);
328 gboolean (*set_attribute) (GFile *file,
329 const char *attribute,
330 const GFileAttributeValue *value,
331 GFileQueryInfoFlags flags,
332 GCancellable *cancellable,
334 gboolean (*set_attributes_from_info) (GFile *file,
336 GFileQueryInfoFlags flags,
337 GCancellable *cancellable,
339 void (*set_attributes_async) (GFile *file,
341 GFileQueryInfoFlags flags,
343 GCancellable *cancellable,
344 GAsyncReadyCallback callback,
346 gboolean (*set_attributes_finish) (GFile *file,
347 GAsyncResult *result,
351 GFileInputStream * (*read) (GFile *file,
352 GCancellable *cancellable,
354 void (*read_async) (GFile *file,
356 GCancellable *cancellable,
357 GAsyncReadyCallback callback,
359 GFileInputStream * (*read_finish) (GFile *file,
363 GFileOutputStream * (*append_to) (GFile *file,
364 GFileCreateFlags flags,
365 GCancellable *cancellable,
367 void (*append_to_async) (GFile *file,
368 GFileCreateFlags flags,
370 GCancellable *cancellable,
371 GAsyncReadyCallback callback,
373 GFileOutputStream * (*append_to_finish) (GFile *file,
377 GFileOutputStream * (*create) (GFile *file,
378 GFileCreateFlags flags,
379 GCancellable *cancellable,
381 void (*create_async) (GFile *file,
382 GFileCreateFlags flags,
384 GCancellable *cancellable,
385 GAsyncReadyCallback callback,
387 GFileOutputStream * (*create_finish) (GFile *file,
391 GFileOutputStream * (*replace) (GFile *file,
393 gboolean make_backup,
394 GFileCreateFlags flags,
395 GCancellable *cancellable,
397 void (*replace_async) (GFile *file,
399 gboolean make_backup,
400 GFileCreateFlags flags,
402 GCancellable *cancellable,
403 GAsyncReadyCallback callback,
405 GFileOutputStream * (*replace_finish) (GFile *file,
409 gboolean (*delete_file) (GFile *file,
410 GCancellable *cancellable,
412 void (*_delete_file_async) (void);
413 void (*_delete_file_finish) (void);
415 gboolean (*trash) (GFile *file,
416 GCancellable *cancellable,
418 void (*_trash_async) (void);
419 void (*_trash_finish) (void);
421 gboolean (*make_directory) (GFile *file,
422 GCancellable *cancellable,
424 void (*_make_directory_async) (void);
425 void (*_make_directory_finish) (void);
427 gboolean (*make_symbolic_link) (GFile *file,
428 const char *symlink_value,
429 GCancellable *cancellable,
431 void (*_make_symbolic_link_async) (void);
432 void (*_make_symbolic_link_finish) (void);
434 gboolean (*copy) (GFile *source,
436 GFileCopyFlags flags,
437 GCancellable *cancellable,
438 GFileProgressCallback progress_callback,
439 gpointer progress_callback_data,
441 void (*_copy_async) (void);
442 void (*_copy_finish) (void);
444 gboolean (*move) (GFile *source,
446 GFileCopyFlags flags,
447 GCancellable *cancellable,
448 GFileProgressCallback progress_callback,
449 gpointer progress_callback_data,
452 void (*_move_async) (void);
453 void (*_move_finish) (void);
456 void (*mount_mountable) (GFile *file,
457 GMountOperation *mount_operation,
458 GCancellable *cancellable,
459 GAsyncReadyCallback callback,
461 GFile * (*mount_mountable_finish) (GFile *file,
462 GAsyncResult *result,
464 void (*unmount_mountable) (GFile *file,
465 GCancellable *cancellable,
466 GAsyncReadyCallback callback,
468 gboolean (*unmount_mountable_finish) (GFile *file,
469 GAsyncResult *result,
471 void (*eject_mountable) (GFile *file,
472 GCancellable *cancellable,
473 GAsyncReadyCallback callback,
475 gboolean (*eject_mountable_finish) (GFile *file,
476 GAsyncResult *result,
480 void (*mount_for_location) (GFile *location,
481 GMountOperation *mount_operation,
482 GCancellable *cancellable,
483 GAsyncReadyCallback callback,
485 gboolean (*mount_for_location_finish) (GFile *location,
486 GAsyncResult *result,
489 GDirectoryMonitor* (*monitor_dir) (GFile *file,
490 GFileMonitorFlags flags,
491 GCancellable *cancellable);
493 GFileMonitor* (*monitor_file) (GFile *file,
494 GFileMonitorFlags flags,
495 GCancellable *cancellable);
499 GType g_file_get_type (void) G_GNUC_CONST;
501 GFile * g_file_new_for_path (const char *path);
502 GFile * g_file_new_for_uri (const char *uri);
503 GFile * g_file_new_for_commandline_arg (const char *arg);
504 GFile * g_file_parse_name (const char *parse_name);
505 GFile * g_file_dup (GFile *file);
506 guint g_file_hash (gconstpointer file);
507 gboolean g_file_equal (GFile *file1,
509 char * g_file_get_basename (GFile *file);
510 char * g_file_get_path (GFile *file);
511 char * g_file_get_uri (GFile *file);
512 char * g_file_get_parse_name (GFile *file);
513 GFile * g_file_get_parent (GFile *file);
514 GFile * g_file_get_child (GFile *file,
516 GFile * g_file_get_child_for_display_name (GFile *file,
517 const char *display_name,
519 gboolean g_file_contains_file (GFile *parent,
521 char * g_file_get_relative_path (GFile *parent,
523 GFile * g_file_resolve_relative_path (GFile *file,
524 const char *relative_path);
525 gboolean g_file_is_native (GFile *file);
526 gboolean g_file_has_uri_scheme (GFile *file,
527 const char *uri_scheme);
528 char * g_file_get_uri_scheme (GFile *file);
529 GFileInputStream * g_file_read (GFile *file,
530 GCancellable *cancellable,
532 void g_file_read_async (GFile *file,
534 GCancellable *cancellable,
535 GAsyncReadyCallback callback,
537 GFileInputStream * g_file_read_finish (GFile *file,
540 GFileOutputStream * g_file_append_to (GFile *file,
541 GFileCreateFlags flags,
542 GCancellable *cancellable,
544 GFileOutputStream * g_file_create (GFile *file,
545 GFileCreateFlags flags,
546 GCancellable *cancellable,
548 GFileOutputStream * g_file_replace (GFile *file,
550 gboolean make_backup,
551 GFileCreateFlags flags,
552 GCancellable *cancellable,
554 void g_file_append_to_async (GFile *file,
555 GFileCreateFlags flags,
557 GCancellable *cancellable,
558 GAsyncReadyCallback callback,
560 GFileOutputStream * g_file_append_to_finish (GFile *file,
563 void g_file_create_async (GFile *file,
564 GFileCreateFlags flags,
566 GCancellable *cancellable,
567 GAsyncReadyCallback callback,
569 GFileOutputStream * g_file_create_finish (GFile *file,
572 void g_file_replace_async (GFile *file,
574 gboolean make_backup,
575 GFileCreateFlags flags,
577 GCancellable *cancellable,
578 GAsyncReadyCallback callback,
580 GFileOutputStream * g_file_replace_finish (GFile *file,
583 GFileInfo * g_file_query_info (GFile *file,
584 const char *attributes,
585 GFileQueryInfoFlags flags,
586 GCancellable *cancellable,
588 void g_file_query_info_async (GFile *file,
589 const char *attributes,
590 GFileQueryInfoFlags flags,
592 GCancellable *cancellable,
593 GAsyncReadyCallback callback,
595 GFileInfo * g_file_query_info_finish (GFile *file,
598 GFileInfo * g_file_query_filesystem_info (GFile *file,
599 const char *attributes,
600 GCancellable *cancellable,
602 GVolume * g_file_find_enclosing_volume (GFile *file,
603 GCancellable *cancellable,
605 GFileEnumerator * g_file_enumerate_children (GFile *file,
606 const char *attributes,
607 GFileQueryInfoFlags flags,
608 GCancellable *cancellable,
610 void g_file_enumerate_children_async (GFile *file,
611 const char *attributes,
612 GFileQueryInfoFlags flags,
614 GCancellable *cancellable,
615 GAsyncReadyCallback callback,
617 GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
620 GFile * g_file_set_display_name (GFile *file,
621 const char *display_name,
622 GCancellable *cancellable,
624 void g_file_set_display_name_async (GFile *file,
625 const char *display_name,
627 GCancellable *cancellable,
628 GAsyncReadyCallback callback,
630 GFile * g_file_set_display_name_finish (GFile *file,
633 gboolean g_file_delete (GFile *file,
634 GCancellable *cancellable,
636 gboolean g_file_trash (GFile *file,
637 GCancellable *cancellable,
639 gboolean g_file_copy (GFile *source,
641 GFileCopyFlags flags,
642 GCancellable *cancellable,
643 GFileProgressCallback progress_callback,
644 gpointer progress_callback_data,
646 gboolean g_file_move (GFile *source,
648 GFileCopyFlags flags,
649 GCancellable *cancellable,
650 GFileProgressCallback progress_callback,
651 gpointer progress_callback_data,
653 gboolean g_file_make_directory (GFile *file,
654 GCancellable *cancellable,
656 gboolean g_file_make_symbolic_link (GFile *file,
657 const char *symlink_value,
658 GCancellable *cancellable,
660 GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
661 GCancellable *cancellable,
663 GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
664 GCancellable *cancellable,
666 gboolean g_file_set_attribute (GFile *file,
667 const char *attribute,
668 const GFileAttributeValue *value,
669 GFileQueryInfoFlags flags,
670 GCancellable *cancellable,
672 gboolean g_file_set_attributes_from_info (GFile *file,
674 GFileQueryInfoFlags flags,
675 GCancellable *cancellable,
677 void g_file_set_attributes_async (GFile *file,
679 GFileQueryInfoFlags flags,
681 GCancellable *cancellable,
682 GAsyncReadyCallback callback,
684 gboolean g_file_set_attributes_finish (GFile *file,
685 GAsyncResult *result,
688 gboolean g_file_set_attribute_string (GFile *file,
689 const char *attribute,
691 GFileQueryInfoFlags flags,
692 GCancellable *cancellable,
694 gboolean g_file_set_attribute_byte_string (GFile *file,
695 const char *attribute,
697 GFileQueryInfoFlags flags,
698 GCancellable *cancellable,
700 gboolean g_file_set_attribute_uint32 (GFile *file,
701 const char *attribute,
703 GFileQueryInfoFlags flags,
704 GCancellable *cancellable,
706 gboolean g_file_set_attribute_int32 (GFile *file,
707 const char *attribute,
709 GFileQueryInfoFlags flags,
710 GCancellable *cancellable,
712 gboolean g_file_set_attribute_uint64 (GFile *file,
713 const char *attribute,
715 GFileQueryInfoFlags flags,
716 GCancellable *cancellable,
718 gboolean g_file_set_attribute_int64 (GFile *file,
719 const char *attribute,
721 GFileQueryInfoFlags flags,
722 GCancellable *cancellable,
724 void g_mount_for_location (GFile *location,
725 GMountOperation *mount_operation,
726 GCancellable *cancellable,
727 GAsyncReadyCallback callback,
729 gboolean g_mount_for_location_finish (GFile *location,
730 GAsyncResult *result,
732 void g_file_mount_mountable (GFile *file,
733 GMountOperation *mount_operation,
734 GCancellable *cancellable,
735 GAsyncReadyCallback callback,
737 GFile * g_file_mount_mountable_finish (GFile *file,
738 GAsyncResult *result,
740 void g_file_unmount_mountable (GFile *file,
741 GCancellable *cancellable,
742 GAsyncReadyCallback callback,
744 gboolean g_file_unmount_mountable_finish (GFile *file,
745 GAsyncResult *result,
747 void g_file_eject_mountable (GFile *file,
748 GCancellable *cancellable,
749 GAsyncReadyCallback callback,
751 gboolean g_file_eject_mountable_finish (GFile *file,
752 GAsyncResult *result,
755 gboolean g_file_copy_attributes (GFile *source,
757 GFileCopyFlags flags,
758 GCancellable *cancellable,
762 GDirectoryMonitor* g_file_monitor_directory (GFile *file,
763 GFileMonitorFlags flags,
764 GCancellable *cancellable);
765 GFileMonitor* g_file_monitor_file (GFile *file,
766 GFileMonitorFlags flags,
767 GCancellable *cancellable);
772 gboolean g_file_load_contents (GFile *file,
773 GCancellable *cancellable,
778 void g_file_load_contents_async (GFile *file,
779 GCancellable *cancellable,
780 GAsyncReadyCallback callback,
782 gboolean g_file_load_contents_finish (GFile *file,
788 void g_file_load_partial_contents_async (GFile *file,
789 GCancellable *cancellable,
790 GFileReadMoreCallback read_more_callback,
791 GAsyncReadyCallback callback,
793 gboolean g_file_load_partial_contents_finish (GFile *file,
799 gboolean g_file_replace_contents (GFile *file,
800 const char *contents,
803 gboolean make_backup,
804 GFileCreateFlags flags,
806 GCancellable *cancellable,
808 void g_file_replace_contents_async (GFile *file,
809 const char *contents,
812 gboolean make_backup,
813 GFileCreateFlags flags,
814 GCancellable *cancellable,
815 GAsyncReadyCallback callback,
817 gboolean g_file_replace_contents_finish (GFile *file,
824 #endif /* __G_FILE_H__ */