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:
44 * Flags used when querying a #GFileInfo.
47 G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1<<0)
48 } GFileQueryInfoFlags;
52 * @G_FILE_CREATE_FLAGS_NONE:
53 * @G_FILE_CREATE_FLAGS_PRIVATE:
55 * Flags used when an operation may create a file.
58 G_FILE_CREATE_FLAGS_NONE = 0,
59 G_FILE_CREATE_FLAGS_PRIVATE = (1<<0)
64 * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
65 * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
66 * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
67 * @G_FILE_COPY_ALL_METADATA: Copy all file metadata (see #GFileInfo).
69 * Flags used when copying or moving files.
72 G_FILE_COPY_OVERWRITE = (1<<0),
73 G_FILE_COPY_BACKUP = (1<<1),
74 G_FILE_COPY_NOFOLLOW_SYMLINKS = (1<<2),
75 G_FILE_COPY_ALL_METADATA = (1<<3)
80 * @G_FILE_MONITOR_FLAGS_NONE: No flags set.
81 * @G_FILE_MONITOR_FLAGS_MONITOR_MOUNTS: Watch for mount events.
83 * Flags used to set what a #GFileMonitor or #GDirectoryMonitor will watch for.
86 G_FILE_MONITOR_FLAGS_NONE = 0,
87 G_FILE_MONITOR_FLAGS_MONITOR_MOUNTS = (1<<0)
93 * A handle to an object implementing the #GFileIface interface.
94 * Generally stores a location within the file system. Handles do not
95 * necessarily represent files or directories that currently exist.
97 typedef struct _GFile GFile; /* Dummy typedef */
98 typedef struct _GFileIface GFileIface;
99 typedef struct _GDirectoryMonitor GDirectoryMonitor;
100 typedef struct _GFileMonitor GFileMonitor;
105 * A handle to an object implementing the #GVolumeIface interface.
107 typedef struct _GVolume GVolume; /* Dummy typedef */
110 * GFileProgressCallback:
111 * @current_num_bytes: the current number of bytes in the operation.
112 * @total_num_bytes: the total number of bytes in the operation.
113 * @user_data: user data passed to the callback.
115 * When doing file operations that may take a while, such as moving
116 * a file or copying a file, a progress callback is used to pass how
117 * far along that operation is to the application.
119 typedef void (*GFileProgressCallback) (goffset current_num_bytes,
120 goffset total_num_bytes,
124 * GFileReadMoreCallback:
131 typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
133 gpointer callback_data);
137 * @g_iface: The parent interface.
138 * @dup: Duplicates a #GFile.
139 * @hash: Creates a hash of a #GFile.
140 * @equal: Checks equality of two given #GFile<!-- -->s.
141 * @is_native: Checks to see if a file is native to the system.
142 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
143 * @get_uri_scheme: Gets the URI scheme for a #GFile.
144 * @get_basename: Gets the basename for a given #GFile.
145 * @get_path: Gets the current path within a #GFile.
146 * @get_uri: Gets a URI for the path within a #GFile.
147 * @get_parse_name: Gets the parsed name for the #GFile.
148 * @get_parent: Gets the parent directory for the #GFile.
149 * @contains_file: Checks whether a #GFile contains a specified file.
150 * @get_relative_path: Gets the path for a #GFile relative to a given path.
151 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
152 * @get_child_for_display_name: Gets the child #GFile for a given display name.
153 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
154 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
155 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
156 * @query_info: Gets the #GFileInfo for a #GFile.
157 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
158 * @query_info_finish: Finishes an asynchronous query info operation.
159 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
160 * @_query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
161 * @_query_filesystem_info_finish: Finishes asynchronously getting the file system info.
162 * @find_enclosing_volume: Gets a #GVolume for the #GFile.
163 * @find_enclosing_volume_async: Asynchronously gets the #GVolume for a #GFile.
164 * @find_enclosing_volume_finish: Finishes asynchronously getting the volume.
165 * @set_display_name: Sets the display name for a #GFile.
166 * @set_display_name_async: Asynchronously sets a #GFile's display name.
167 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
168 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
169 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
170 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
171 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
172 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
173 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
174 * @set_attribute: Sets a #GFileAttribute.
175 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
176 * @set_attributes_async: Asynchronously sets a file's attributes.
177 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
178 * @read: Reads a file asynchronously.
179 * @read_async: Asynchronously reads a file.
180 * @read_finish: Finishes asynchronously reading a file.
181 * @append_to: Writes to the end of a file.
182 * @append_to_async: Asynchronously writes to the end of a file.
183 * @append_to_finish: Finishes an asynchronous file append operation.
184 * @create: Creates a new file.
185 * @create_async: Asynchronously creates a file.
186 * @create_finish: Finishes asynchronously creating a file.
187 * @replace: Replaces the contents of a file.
188 * @replace_async: Asynchronously replaces the contents of a file.
189 * @replace_finish: Finishes asynchronously replacing a file.
190 * @delete_file: Deletes a file.
191 * @_delete_file_async: Asynchronously deletes a file.
192 * @_delete_file_finish: Finishes an asynchronous delete.
193 * @trash: Sends a #GFile to the Trash location.
194 * @_trash_async: Asynchronously sends a #GFile to the Trash location.
195 * @_trash_finish: Finishes an asynchronous file trashing operation.
196 * @make_directory: Makes a directory.
197 * @_make_directory_async: Asynchronously makes a directory.
198 * @_make_directory_finish: Finishes making a directory asynchronously.
199 * @make_symbolic_link: Makes a symbolic link.
200 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
201 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
202 * @copy: Copies a file.
203 * @_copy_async: Asynchronously copies a file.
204 * @_copy_finish: Finishes an asynchronous copy operation.
205 * @move: Moves a file.
206 * @_move_async: Asynchronously moves a file.
207 * @_move_finish: Finishes an asynchronous move operation.
208 * @mount_mountable: Mounts a mountable object.
209 * @mount_mountable_finish: Finishes a mounting operation.
210 * @unmount_mountable: Unmounts a mountable object.
211 * @unmount_mountable_finish: Finishes an unmount operation.
212 * @eject_mountable: Ejects a mountable.
213 * @eject_mountable_finish: Finishes an eject operation.
214 * @mount_for_location: Mounts a specified location.
215 * @mount_for_location_finish: Finishes mounting a specified location.
216 * @monitor_dir: Creates a #GDirectoryMonitor for the location.
217 * @monitor_file: Creates a #GFileMonitor for the location.
219 * An interface for writing VFS file handles.
223 GTypeInterface g_iface;
227 GFile * (*dup) (GFile *file);
228 guint (*hash) (GFile *file);
229 gboolean (*equal) (GFile *file1,
231 gboolean (*is_native) (GFile *file);
232 gboolean (*has_uri_scheme) (GFile *file,
233 const char *uri_scheme);
234 char * (*get_uri_scheme) (GFile *file);
235 char * (*get_basename) (GFile *file);
236 char * (*get_path) (GFile *file);
237 char * (*get_uri) (GFile *file);
238 char * (*get_parse_name) (GFile *file);
239 GFile * (*get_parent) (GFile *file);
240 gboolean (*contains_file) (GFile *parent,
242 char * (*get_relative_path) (GFile *parent,
244 GFile * (*resolve_relative_path) (GFile *file,
245 const char *relative_path);
246 GFile * (*get_child_for_display_name) (GFile *file,
247 const char *display_name,
250 GFileEnumerator * (*enumerate_children) (GFile *file,
251 const char *attributes,
252 GFileQueryInfoFlags flags,
253 GCancellable *cancellable,
255 void (*enumerate_children_async) (GFile *file,
256 const char *attributes,
257 GFileQueryInfoFlags flags,
259 GCancellable *cancellable,
260 GAsyncReadyCallback callback,
262 GFileEnumerator * (*enumerate_children_finish) (GFile *file,
266 GFileInfo * (*query_info) (GFile *file,
267 const char *attributes,
268 GFileQueryInfoFlags flags,
269 GCancellable *cancellable,
271 void (*query_info_async) (GFile *file,
272 const char *attributes,
273 GFileQueryInfoFlags flags,
275 GCancellable *cancellable,
276 GAsyncReadyCallback callback,
278 GFileInfo * (*query_info_finish) (GFile *file,
282 GFileInfo * (*query_filesystem_info)(GFile *file,
283 const char *attributes,
284 GCancellable *cancellable,
286 void (*_query_filesystem_info_async) (void);
287 void (*_query_filesystem_info_finish) (void);
289 GVolume * (*find_enclosing_volume)(GFile *file,
290 GCancellable *cancellable,
292 void (*find_enclosing_volume_async)(GFile *file,
294 GCancellable *cancellable,
295 GAsyncReadyCallback callback,
297 GVolume * (*find_enclosing_volume_finish)(GFile *file,
301 GFile * (*set_display_name) (GFile *file,
302 const char *display_name,
303 GCancellable *cancellable,
305 void (*set_display_name_async) (GFile *file,
306 const char *display_name,
308 GCancellable *cancellable,
309 GAsyncReadyCallback callback,
311 GFile * (*set_display_name_finish) (GFile *file,
315 GFileAttributeInfoList * (*query_settable_attributes) (GFile *file,
316 GCancellable *cancellable,
318 void (*_query_settable_attributes_async) (void);
319 void (*_query_settable_attributes_finish) (void);
321 GFileAttributeInfoList * (*query_writable_namespaces) (GFile *file,
322 GCancellable *cancellable,
324 void (*_query_writable_namespaces_async) (void);
325 void (*_query_writable_namespaces_finish) (void);
327 gboolean (*set_attribute) (GFile *file,
328 const char *attribute,
329 const GFileAttributeValue *value,
330 GFileQueryInfoFlags flags,
331 GCancellable *cancellable,
333 gboolean (*set_attributes_from_info) (GFile *file,
335 GFileQueryInfoFlags flags,
336 GCancellable *cancellable,
338 void (*set_attributes_async) (GFile *file,
340 GFileQueryInfoFlags flags,
342 GCancellable *cancellable,
343 GAsyncReadyCallback callback,
345 gboolean (*set_attributes_finish) (GFile *file,
346 GAsyncResult *result,
350 GFileInputStream * (*read) (GFile *file,
351 GCancellable *cancellable,
353 void (*read_async) (GFile *file,
355 GCancellable *cancellable,
356 GAsyncReadyCallback callback,
358 GFileInputStream * (*read_finish) (GFile *file,
362 GFileOutputStream * (*append_to) (GFile *file,
363 GFileCreateFlags flags,
364 GCancellable *cancellable,
366 void (*append_to_async) (GFile *file,
367 GFileCreateFlags flags,
369 GCancellable *cancellable,
370 GAsyncReadyCallback callback,
372 GFileOutputStream * (*append_to_finish) (GFile *file,
376 GFileOutputStream * (*create) (GFile *file,
377 GFileCreateFlags flags,
378 GCancellable *cancellable,
380 void (*create_async) (GFile *file,
381 GFileCreateFlags flags,
383 GCancellable *cancellable,
384 GAsyncReadyCallback callback,
386 GFileOutputStream * (*create_finish) (GFile *file,
390 GFileOutputStream * (*replace) (GFile *file,
392 gboolean make_backup,
393 GFileCreateFlags flags,
394 GCancellable *cancellable,
396 void (*replace_async) (GFile *file,
398 gboolean make_backup,
399 GFileCreateFlags flags,
401 GCancellable *cancellable,
402 GAsyncReadyCallback callback,
404 GFileOutputStream * (*replace_finish) (GFile *file,
408 gboolean (*delete_file) (GFile *file,
409 GCancellable *cancellable,
411 void (*_delete_file_async) (void);
412 void (*_delete_file_finish) (void);
414 gboolean (*trash) (GFile *file,
415 GCancellable *cancellable,
417 void (*_trash_async) (void);
418 void (*_trash_finish) (void);
420 gboolean (*make_directory) (GFile *file,
421 GCancellable *cancellable,
423 void (*_make_directory_async) (void);
424 void (*_make_directory_finish) (void);
426 gboolean (*make_symbolic_link) (GFile *file,
427 const char *symlink_value,
428 GCancellable *cancellable,
430 void (*_make_symbolic_link_async) (void);
431 void (*_make_symbolic_link_finish) (void);
433 gboolean (*copy) (GFile *source,
435 GFileCopyFlags flags,
436 GCancellable *cancellable,
437 GFileProgressCallback progress_callback,
438 gpointer progress_callback_data,
440 void (*_copy_async) (void);
441 void (*_copy_finish) (void);
443 gboolean (*move) (GFile *source,
445 GFileCopyFlags flags,
446 GCancellable *cancellable,
447 GFileProgressCallback progress_callback,
448 gpointer progress_callback_data,
451 void (*_move_async) (void);
452 void (*_move_finish) (void);
455 void (*mount_mountable) (GFile *file,
456 GMountOperation *mount_operation,
457 GCancellable *cancellable,
458 GAsyncReadyCallback callback,
460 GFile * (*mount_mountable_finish) (GFile *file,
461 GAsyncResult *result,
463 void (*unmount_mountable) (GFile *file,
464 GCancellable *cancellable,
465 GAsyncReadyCallback callback,
467 gboolean (*unmount_mountable_finish) (GFile *file,
468 GAsyncResult *result,
470 void (*eject_mountable) (GFile *file,
471 GCancellable *cancellable,
472 GAsyncReadyCallback callback,
474 gboolean (*eject_mountable_finish) (GFile *file,
475 GAsyncResult *result,
479 void (*mount_for_location) (GFile *location,
480 GMountOperation *mount_operation,
481 GCancellable *cancellable,
482 GAsyncReadyCallback callback,
484 gboolean (*mount_for_location_finish) (GFile *location,
485 GAsyncResult *result,
488 GDirectoryMonitor* (*monitor_dir) (GFile *file,
489 GFileMonitorFlags flags,
490 GCancellable *cancellable);
492 GFileMonitor* (*monitor_file) (GFile *file,
493 GFileMonitorFlags flags,
494 GCancellable *cancellable);
498 GType g_file_get_type (void) G_GNUC_CONST;
500 GFile * g_file_new_for_path (const char *path);
501 GFile * g_file_new_for_uri (const char *uri);
502 GFile * g_file_new_for_commandline_arg (const char *arg);
503 GFile * g_file_parse_name (const char *parse_name);
504 GFile * g_file_dup (GFile *file);
505 guint g_file_hash (gconstpointer file);
506 gboolean g_file_equal (GFile *file1,
508 char * g_file_get_basename (GFile *file);
509 char * g_file_get_path (GFile *file);
510 char * g_file_get_uri (GFile *file);
511 char * g_file_get_parse_name (GFile *file);
512 GFile * g_file_get_parent (GFile *file);
513 GFile * g_file_get_child (GFile *file,
515 GFile * g_file_get_child_for_display_name (GFile *file,
516 const char *display_name,
518 gboolean g_file_contains_file (GFile *parent,
520 char * g_file_get_relative_path (GFile *parent,
522 GFile * g_file_resolve_relative_path (GFile *file,
523 const char *relative_path);
524 gboolean g_file_is_native (GFile *file);
525 gboolean g_file_has_uri_scheme (GFile *file,
526 const char *uri_scheme);
527 char * g_file_get_uri_scheme (GFile *file);
528 GFileInputStream * g_file_read (GFile *file,
529 GCancellable *cancellable,
531 void g_file_read_async (GFile *file,
533 GCancellable *cancellable,
534 GAsyncReadyCallback callback,
536 GFileInputStream * g_file_read_finish (GFile *file,
539 GFileOutputStream * g_file_append_to (GFile *file,
540 GFileCreateFlags flags,
541 GCancellable *cancellable,
543 GFileOutputStream * g_file_create (GFile *file,
544 GFileCreateFlags flags,
545 GCancellable *cancellable,
547 GFileOutputStream * g_file_replace (GFile *file,
549 gboolean make_backup,
550 GFileCreateFlags flags,
551 GCancellable *cancellable,
553 void g_file_append_to_async (GFile *file,
554 GFileCreateFlags flags,
556 GCancellable *cancellable,
557 GAsyncReadyCallback callback,
559 GFileOutputStream * g_file_append_to_finish (GFile *file,
562 void g_file_create_async (GFile *file,
563 GFileCreateFlags flags,
565 GCancellable *cancellable,
566 GAsyncReadyCallback callback,
568 GFileOutputStream * g_file_create_finish (GFile *file,
571 void g_file_replace_async (GFile *file,
573 gboolean make_backup,
574 GFileCreateFlags flags,
576 GCancellable *cancellable,
577 GAsyncReadyCallback callback,
579 GFileOutputStream * g_file_replace_finish (GFile *file,
582 GFileInfo * g_file_query_info (GFile *file,
583 const char *attributes,
584 GFileQueryInfoFlags flags,
585 GCancellable *cancellable,
587 void g_file_query_info_async (GFile *file,
588 const char *attributes,
589 GFileQueryInfoFlags flags,
591 GCancellable *cancellable,
592 GAsyncReadyCallback callback,
594 GFileInfo * g_file_query_info_finish (GFile *file,
597 GFileInfo * g_file_query_filesystem_info (GFile *file,
598 const char *attributes,
599 GCancellable *cancellable,
601 GVolume * g_file_find_enclosing_volume (GFile *file,
602 GCancellable *cancellable,
604 GFileEnumerator * g_file_enumerate_children (GFile *file,
605 const char *attributes,
606 GFileQueryInfoFlags flags,
607 GCancellable *cancellable,
609 void g_file_enumerate_children_async (GFile *file,
610 const char *attributes,
611 GFileQueryInfoFlags flags,
613 GCancellable *cancellable,
614 GAsyncReadyCallback callback,
616 GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
619 GFile * g_file_set_display_name (GFile *file,
620 const char *display_name,
621 GCancellable *cancellable,
623 void g_file_set_display_name_async (GFile *file,
624 const char *display_name,
626 GCancellable *cancellable,
627 GAsyncReadyCallback callback,
629 GFile * g_file_set_display_name_finish (GFile *file,
632 gboolean g_file_delete (GFile *file,
633 GCancellable *cancellable,
635 gboolean g_file_trash (GFile *file,
636 GCancellable *cancellable,
638 gboolean g_file_copy (GFile *source,
640 GFileCopyFlags flags,
641 GCancellable *cancellable,
642 GFileProgressCallback progress_callback,
643 gpointer progress_callback_data,
645 gboolean g_file_move (GFile *source,
647 GFileCopyFlags flags,
648 GCancellable *cancellable,
649 GFileProgressCallback progress_callback,
650 gpointer progress_callback_data,
652 gboolean g_file_make_directory (GFile *file,
653 GCancellable *cancellable,
655 gboolean g_file_make_symbolic_link (GFile *file,
656 const char *symlink_value,
657 GCancellable *cancellable,
659 GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
660 GCancellable *cancellable,
662 GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
663 GCancellable *cancellable,
665 gboolean g_file_set_attribute (GFile *file,
666 const char *attribute,
667 const GFileAttributeValue *value,
668 GFileQueryInfoFlags flags,
669 GCancellable *cancellable,
671 gboolean g_file_set_attributes_from_info (GFile *file,
673 GFileQueryInfoFlags flags,
674 GCancellable *cancellable,
676 void g_file_set_attributes_async (GFile *file,
678 GFileQueryInfoFlags flags,
680 GCancellable *cancellable,
681 GAsyncReadyCallback callback,
683 gboolean g_file_set_attributes_finish (GFile *file,
684 GAsyncResult *result,
687 gboolean g_file_set_attribute_string (GFile *file,
688 const char *attribute,
690 GFileQueryInfoFlags flags,
691 GCancellable *cancellable,
693 gboolean g_file_set_attribute_byte_string (GFile *file,
694 const char *attribute,
696 GFileQueryInfoFlags flags,
697 GCancellable *cancellable,
699 gboolean g_file_set_attribute_uint32 (GFile *file,
700 const char *attribute,
702 GFileQueryInfoFlags flags,
703 GCancellable *cancellable,
705 gboolean g_file_set_attribute_int32 (GFile *file,
706 const char *attribute,
708 GFileQueryInfoFlags flags,
709 GCancellable *cancellable,
711 gboolean g_file_set_attribute_uint64 (GFile *file,
712 const char *attribute,
714 GFileQueryInfoFlags flags,
715 GCancellable *cancellable,
717 gboolean g_file_set_attribute_int64 (GFile *file,
718 const char *attribute,
720 GFileQueryInfoFlags flags,
721 GCancellable *cancellable,
723 void g_mount_for_location (GFile *location,
724 GMountOperation *mount_operation,
725 GCancellable *cancellable,
726 GAsyncReadyCallback callback,
728 gboolean g_mount_for_location_finish (GFile *location,
729 GAsyncResult *result,
731 void g_file_mount_mountable (GFile *file,
732 GMountOperation *mount_operation,
733 GCancellable *cancellable,
734 GAsyncReadyCallback callback,
736 GFile * g_file_mount_mountable_finish (GFile *file,
737 GAsyncResult *result,
739 void g_file_unmount_mountable (GFile *file,
740 GCancellable *cancellable,
741 GAsyncReadyCallback callback,
743 gboolean g_file_unmount_mountable_finish (GFile *file,
744 GAsyncResult *result,
746 void g_file_eject_mountable (GFile *file,
747 GCancellable *cancellable,
748 GAsyncReadyCallback callback,
750 gboolean g_file_eject_mountable_finish (GFile *file,
751 GAsyncResult *result,
754 gboolean g_file_copy_attributes (GFile *source,
756 GFileCopyFlags flags,
757 GCancellable *cancellable,
761 GDirectoryMonitor* g_file_monitor_directory (GFile *file,
762 GFileMonitorFlags flags,
763 GCancellable *cancellable);
764 GFileMonitor* g_file_monitor_file (GFile *file,
765 GFileMonitorFlags flags,
766 GCancellable *cancellable);
771 gboolean g_file_load_contents (GFile *file,
772 GCancellable *cancellable,
777 void g_file_load_contents_async (GFile *file,
778 GCancellable *cancellable,
779 GAsyncReadyCallback callback,
781 gboolean g_file_load_contents_finish (GFile *file,
787 void g_file_load_partial_contents_async (GFile *file,
788 GCancellable *cancellable,
789 GFileReadMoreCallback read_more_callback,
790 GAsyncReadyCallback callback,
792 gboolean g_file_load_partial_contents_finish (GFile *file,
798 gboolean g_file_replace_contents (GFile *file,
799 const char *contents,
802 gboolean make_backup,
803 GFileCreateFlags flags,
805 GCancellable *cancellable,
807 void g_file_replace_contents_async (GFile *file,
808 const char *contents,
811 gboolean make_backup,
812 GFileCreateFlags flags,
813 GCancellable *cancellable,
814 GAsyncReadyCallback callback,
816 gboolean g_file_replace_contents_finish (GFile *file,
823 #endif /* __G_FILE_H__ */