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>
23 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
24 #error "Only <gio/gio.h> can be included directly."
30 #include <glib-object.h>
31 #include <gio/gfileinfo.h>
32 #include <gio/gfileenumerator.h>
33 #include <gio/gfileinputstream.h>
34 #include <gio/gfileoutputstream.h>
35 #include <gio/gmountoperation.h>
36 #include <gio/gappinfo.h>
40 #define G_TYPE_FILE (g_file_get_type ())
41 #define G_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE, GFile))
42 #define G_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE))
43 #define G_FILE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE, GFileIface))
46 * GFileQueryInfoFlags:
47 * @G_FILE_QUERY_INFO_NONE: No flags set.
48 * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
50 * Flags used when querying a #GFileInfo.
53 G_FILE_QUERY_INFO_NONE = 0,
54 G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1<<0) /*< nick=nofollow-symlinks >*/
55 } GFileQueryInfoFlags;
59 * @G_FILE_CREATE_NONE: No flags set.
60 * @G_FILE_CREATE_PRIVATE: Create a file that can only be
61 * accessed by the current user.
63 * Flags used when an operation may create a file.
66 G_FILE_CREATE_NONE = 0,
67 G_FILE_CREATE_PRIVATE = (1<<0)
72 * @G_MOUNT_UNMOUNT_NONE: No flags set.
73 * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding
74 * file operations on the mount.
76 * Flags used when an operation may create a file.
79 G_MOUNT_UNMOUNT_NONE = 0,
80 G_MOUNT_UNMOUNT_FORCE = (1<<0)
85 * @G_FILE_COPY_NONE: No flags set.
86 * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
87 * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
88 * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
89 * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
90 * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
92 * Flags used when copying or moving files.
95 G_FILE_COPY_NONE = 0, /*< nick=none >*/
96 G_FILE_COPY_OVERWRITE = (1<<0),
97 G_FILE_COPY_BACKUP = (1<<1),
98 G_FILE_COPY_NOFOLLOW_SYMLINKS = (1<<2),
99 G_FILE_COPY_ALL_METADATA = (1<<3),
100 G_FILE_COPY_NO_FALLBACK_FOR_MOVE = (1<<4)
105 * @G_FILE_MONITOR_NONE: No flags set.
106 * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
108 * Flags used to set what a #GFileMonitor will watch for.
111 G_FILE_MONITOR_NONE = 0,
112 G_FILE_MONITOR_WATCH_MOUNTS = (1<<0)
118 * A handle to an object implementing the #GFileIface interface.
119 * Generally stores a location within the file system. Handles do not
120 * necessarily represent files or directories that currently exist.
122 typedef struct _GFile GFile; /* Dummy typedef */
123 typedef struct _GFileIface GFileIface;
124 typedef struct _GFileMonitor GFileMonitor;
129 * A handle to an object implementing the #GMountIface interface.
131 typedef struct _GMount GMount; /* Dummy typedef */
134 * GFileProgressCallback:
135 * @current_num_bytes: the current number of bytes in the operation.
136 * @total_num_bytes: the total number of bytes in the operation.
137 * @user_data: user data passed to the callback.
139 * When doing file operations that may take a while, such as moving
140 * a file or copying a file, a progress callback is used to pass how
141 * far along that operation is to the application.
143 typedef void (*GFileProgressCallback) (goffset current_num_bytes,
144 goffset total_num_bytes,
148 * GFileReadMoreCallback:
149 * @file_contents: the data as currently read.
150 * @file_size: the size of the data currently read.
151 * @callback_data: data passed to the callback.
153 * When loading the partial contents of a file with g_file_read_partial_contents(),
154 * it may become necessary to determine if any more data from the file should be loaded.
155 * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
156 * should be read, or %FALSE otherwise.
158 * Returns: %TRUE if more data should be read back. %FALSE otherwise.
160 typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
162 gpointer callback_data);
166 * @g_iface: The parent interface.
167 * @dup: Duplicates a #GFile.
168 * @hash: Creates a hash of a #GFile.
169 * @equal: Checks equality of two given #GFile<!-- -->s.
170 * @is_native: Checks to see if a file is native to the system.
171 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
172 * @get_uri_scheme: Gets the URI scheme for a #GFile.
173 * @get_basename: Gets the basename for a given #GFile.
174 * @get_path: Gets the current path within a #GFile.
175 * @get_uri: Gets a URI for the path within a #GFile.
176 * @get_parse_name: Gets the parsed name for the #GFile.
177 * @get_parent: Gets the parent directory for the #GFile.
178 * @contains_file: Checks whether a #GFile contains a specified file.
179 * @get_relative_path: Gets the path for a #GFile relative to a given path.
180 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
181 * @get_child_for_display_name: Gets the child #GFile for a given display name.
182 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
183 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
184 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
185 * @query_info: Gets the #GFileInfo for a #GFile.
186 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
187 * @query_info_finish: Finishes an asynchronous query info operation.
188 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
189 * @_query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
190 * @_query_filesystem_info_finish: Finishes asynchronously getting the file system info.
191 * @find_enclosing_mount: Gets a #GMount for the #GFile.
192 * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
193 * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
194 * @set_display_name: Sets the display name for a #GFile.
195 * @set_display_name_async: Asynchronously sets a #GFile's display name.
196 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
197 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
198 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
199 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
200 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
201 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
202 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
203 * @set_attribute: Sets a #GFileAttribute.
204 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
205 * @set_attributes_async: Asynchronously sets a file's attributes.
206 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
207 * @read_fn: Reads a file asynchronously.
208 * @read_async: Asynchronously reads a file.
209 * @read_finish: Finishes asynchronously reading a file.
210 * @append_to: Writes to the end of a file.
211 * @append_to_async: Asynchronously writes to the end of a file.
212 * @append_to_finish: Finishes an asynchronous file append operation.
213 * @create: Creates a new file.
214 * @create_async: Asynchronously creates a file.
215 * @create_finish: Finishes asynchronously creating a file.
216 * @replace: Replaces the contents of a file.
217 * @replace_async: Asynchronously replaces the contents of a file.
218 * @replace_finish: Finishes asynchronously replacing a file.
219 * @delete_file: Deletes a file.
220 * @_delete_file_async: Asynchronously deletes a file.
221 * @_delete_file_finish: Finishes an asynchronous delete.
222 * @trash: Sends a #GFile to the Trash location.
223 * @_trash_async: Asynchronously sends a #GFile to the Trash location.
224 * @_trash_finish: Finishes an asynchronous file trashing operation.
225 * @make_directory: Makes a directory.
226 * @_make_directory_async: Asynchronously makes a directory.
227 * @_make_directory_finish: Finishes making a directory asynchronously.
228 * @make_symbolic_link: Makes a symbolic link.
229 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
230 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
231 * @copy: Copies a file.
232 * @copy_async: Asynchronously copies a file.
233 * @copy_finish: Finishes an asynchronous copy operation.
234 * @move: Moves a file.
235 * @_move_async: Asynchronously moves a file.
236 * @_move_finish: Finishes an asynchronous move operation.
237 * @mount_mountable: Mounts a mountable object.
238 * @mount_mountable_finish: Finishes a mounting operation.
239 * @unmount_mountable: Unmounts a mountable object.
240 * @unmount_mountable_finish: Finishes an unmount operation.
241 * @eject_mountable: Ejects a mountable.
242 * @eject_mountable_finish: Finishes an eject operation.
243 * @mount_enclosing_volume: Mounts a specified location.
244 * @mount_enclosing_volume_finish: Finishes mounting a specified location.
245 * @monitor_dir: Creates a #GFileMonitor for the location.
246 * @monitor_file: Creates a #GFileMonitor for the location.
248 * An interface for writing VFS file handles.
252 GTypeInterface g_iface;
256 GFile * (*dup) (GFile *file);
257 guint (*hash) (GFile *file);
258 gboolean (*equal) (GFile *file1,
260 gboolean (*is_native) (GFile *file);
261 gboolean (*has_uri_scheme) (GFile *file,
262 const char *uri_scheme);
263 char * (*get_uri_scheme) (GFile *file);
264 char * (*get_basename) (GFile *file);
265 char * (*get_path) (GFile *file);
266 char * (*get_uri) (GFile *file);
267 char * (*get_parse_name) (GFile *file);
268 GFile * (*get_parent) (GFile *file);
269 gboolean (*contains_file) (GFile *parent,
271 char * (*get_relative_path) (GFile *parent,
273 GFile * (*resolve_relative_path) (GFile *file,
274 const char *relative_path);
275 GFile * (*get_child_for_display_name) (GFile *file,
276 const char *display_name,
279 GFileEnumerator * (*enumerate_children) (GFile *file,
280 const char *attributes,
281 GFileQueryInfoFlags flags,
282 GCancellable *cancellable,
284 void (*enumerate_children_async) (GFile *file,
285 const char *attributes,
286 GFileQueryInfoFlags flags,
288 GCancellable *cancellable,
289 GAsyncReadyCallback callback,
291 GFileEnumerator * (*enumerate_children_finish) (GFile *file,
295 GFileInfo * (*query_info) (GFile *file,
296 const char *attributes,
297 GFileQueryInfoFlags flags,
298 GCancellable *cancellable,
300 void (*query_info_async) (GFile *file,
301 const char *attributes,
302 GFileQueryInfoFlags flags,
304 GCancellable *cancellable,
305 GAsyncReadyCallback callback,
307 GFileInfo * (*query_info_finish) (GFile *file,
311 GFileInfo * (*query_filesystem_info)(GFile *file,
312 const char *attributes,
313 GCancellable *cancellable,
315 void (*_query_filesystem_info_async) (void);
316 void (*_query_filesystem_info_finish) (void);
318 GMount * (*find_enclosing_mount)(GFile *file,
319 GCancellable *cancellable,
321 void (*find_enclosing_mount_async)(GFile *file,
323 GCancellable *cancellable,
324 GAsyncReadyCallback callback,
326 GMount * (*find_enclosing_mount_finish)(GFile *file,
330 GFile * (*set_display_name) (GFile *file,
331 const char *display_name,
332 GCancellable *cancellable,
334 void (*set_display_name_async) (GFile *file,
335 const char *display_name,
337 GCancellable *cancellable,
338 GAsyncReadyCallback callback,
340 GFile * (*set_display_name_finish) (GFile *file,
344 GFileAttributeInfoList * (*query_settable_attributes) (GFile *file,
345 GCancellable *cancellable,
347 void (*_query_settable_attributes_async) (void);
348 void (*_query_settable_attributes_finish) (void);
350 GFileAttributeInfoList * (*query_writable_namespaces) (GFile *file,
351 GCancellable *cancellable,
353 void (*_query_writable_namespaces_async) (void);
354 void (*_query_writable_namespaces_finish) (void);
356 gboolean (*set_attribute) (GFile *file,
357 const char *attribute,
358 GFileAttributeType type,
360 GFileQueryInfoFlags flags,
361 GCancellable *cancellable,
363 gboolean (*set_attributes_from_info) (GFile *file,
365 GFileQueryInfoFlags flags,
366 GCancellable *cancellable,
368 void (*set_attributes_async) (GFile *file,
370 GFileQueryInfoFlags flags,
372 GCancellable *cancellable,
373 GAsyncReadyCallback callback,
375 gboolean (*set_attributes_finish) (GFile *file,
376 GAsyncResult *result,
380 GFileInputStream * (*read_fn) (GFile *file,
381 GCancellable *cancellable,
383 void (*read_async) (GFile *file,
385 GCancellable *cancellable,
386 GAsyncReadyCallback callback,
388 GFileInputStream * (*read_finish) (GFile *file,
392 GFileOutputStream * (*append_to) (GFile *file,
393 GFileCreateFlags flags,
394 GCancellable *cancellable,
396 void (*append_to_async) (GFile *file,
397 GFileCreateFlags flags,
399 GCancellable *cancellable,
400 GAsyncReadyCallback callback,
402 GFileOutputStream * (*append_to_finish) (GFile *file,
406 GFileOutputStream * (*create) (GFile *file,
407 GFileCreateFlags flags,
408 GCancellable *cancellable,
410 void (*create_async) (GFile *file,
411 GFileCreateFlags flags,
413 GCancellable *cancellable,
414 GAsyncReadyCallback callback,
416 GFileOutputStream * (*create_finish) (GFile *file,
420 GFileOutputStream * (*replace) (GFile *file,
422 gboolean make_backup,
423 GFileCreateFlags flags,
424 GCancellable *cancellable,
426 void (*replace_async) (GFile *file,
428 gboolean make_backup,
429 GFileCreateFlags flags,
431 GCancellable *cancellable,
432 GAsyncReadyCallback callback,
434 GFileOutputStream * (*replace_finish) (GFile *file,
438 gboolean (*delete_file) (GFile *file,
439 GCancellable *cancellable,
441 void (*_delete_file_async) (void);
442 void (*_delete_file_finish) (void);
444 gboolean (*trash) (GFile *file,
445 GCancellable *cancellable,
447 void (*_trash_async) (void);
448 void (*_trash_finish) (void);
450 gboolean (*make_directory) (GFile *file,
451 GCancellable *cancellable,
453 void (*_make_directory_async) (void);
454 void (*_make_directory_finish) (void);
456 gboolean (*make_symbolic_link) (GFile *file,
457 const char *symlink_value,
458 GCancellable *cancellable,
460 void (*_make_symbolic_link_async) (void);
461 void (*_make_symbolic_link_finish) (void);
463 gboolean (*copy) (GFile *source,
465 GFileCopyFlags flags,
466 GCancellable *cancellable,
467 GFileProgressCallback progress_callback,
468 gpointer progress_callback_data,
470 void (*copy_async) (GFile *source,
472 GFileCopyFlags flags,
474 GCancellable *cancellable,
475 GFileProgressCallback progress_callback,
476 gpointer progress_callback_data,
477 GAsyncReadyCallback callback,
479 gboolean (*copy_finish) (GFile *file,
483 gboolean (*move) (GFile *source,
485 GFileCopyFlags flags,
486 GCancellable *cancellable,
487 GFileProgressCallback progress_callback,
488 gpointer progress_callback_data,
491 void (*_move_async) (void);
492 void (*_move_finish) (void);
495 void (*mount_mountable) (GFile *file,
496 GMountOperation *mount_operation,
497 GCancellable *cancellable,
498 GAsyncReadyCallback callback,
500 GFile * (*mount_mountable_finish) (GFile *file,
501 GAsyncResult *result,
503 void (*unmount_mountable) (GFile *file,
504 GMountUnmountFlags flags,
505 GCancellable *cancellable,
506 GAsyncReadyCallback callback,
508 gboolean (*unmount_mountable_finish) (GFile *file,
509 GAsyncResult *result,
511 void (*eject_mountable) (GFile *file,
512 GMountUnmountFlags flags,
513 GCancellable *cancellable,
514 GAsyncReadyCallback callback,
516 gboolean (*eject_mountable_finish) (GFile *file,
517 GAsyncResult *result,
521 void (*mount_enclosing_volume) (GFile *location,
522 GMountOperation *mount_operation,
523 GCancellable *cancellable,
524 GAsyncReadyCallback callback,
526 gboolean (*mount_enclosing_volume_finish) (GFile *location,
527 GAsyncResult *result,
530 GFileMonitor* (*monitor_dir) (GFile *file,
531 GFileMonitorFlags flags,
532 GCancellable *cancellable,
535 GFileMonitor* (*monitor_file) (GFile *file,
536 GFileMonitorFlags flags,
537 GCancellable *cancellable,
542 GType g_file_get_type (void) G_GNUC_CONST;
544 GFile * g_file_new_for_path (const char *path);
545 GFile * g_file_new_for_uri (const char *uri);
546 GFile * g_file_new_for_commandline_arg (const char *arg);
547 GFile * g_file_parse_name (const char *parse_name);
548 GFile * g_file_dup (GFile *file);
549 guint g_file_hash (gconstpointer file);
550 gboolean g_file_equal (GFile *file1,
552 char * g_file_get_basename (GFile *file);
553 char * g_file_get_path (GFile *file);
554 char * g_file_get_uri (GFile *file);
555 char * g_file_get_parse_name (GFile *file);
556 GFile * g_file_get_parent (GFile *file);
557 GFile * g_file_get_child (GFile *file,
559 GFile * g_file_get_child_for_display_name (GFile *file,
560 const char *display_name,
562 gboolean g_file_contains_file (GFile *parent,
564 char * g_file_get_relative_path (GFile *parent,
566 GFile * g_file_resolve_relative_path (GFile *file,
567 const char *relative_path);
568 gboolean g_file_is_native (GFile *file);
569 gboolean g_file_has_uri_scheme (GFile *file,
570 const char *uri_scheme);
571 char * g_file_get_uri_scheme (GFile *file);
572 GFileInputStream * g_file_read (GFile *file,
573 GCancellable *cancellable,
575 void g_file_read_async (GFile *file,
577 GCancellable *cancellable,
578 GAsyncReadyCallback callback,
580 GFileInputStream * g_file_read_finish (GFile *file,
583 GFileOutputStream * g_file_append_to (GFile *file,
584 GFileCreateFlags flags,
585 GCancellable *cancellable,
587 GFileOutputStream * g_file_create (GFile *file,
588 GFileCreateFlags flags,
589 GCancellable *cancellable,
591 GFileOutputStream * g_file_replace (GFile *file,
593 gboolean make_backup,
594 GFileCreateFlags flags,
595 GCancellable *cancellable,
597 void g_file_append_to_async (GFile *file,
598 GFileCreateFlags flags,
600 GCancellable *cancellable,
601 GAsyncReadyCallback callback,
603 GFileOutputStream * g_file_append_to_finish (GFile *file,
606 void g_file_create_async (GFile *file,
607 GFileCreateFlags flags,
609 GCancellable *cancellable,
610 GAsyncReadyCallback callback,
612 GFileOutputStream * g_file_create_finish (GFile *file,
615 void g_file_replace_async (GFile *file,
617 gboolean make_backup,
618 GFileCreateFlags flags,
620 GCancellable *cancellable,
621 GAsyncReadyCallback callback,
623 GFileOutputStream * g_file_replace_finish (GFile *file,
626 gboolean g_file_query_exists (GFile *file,
627 GCancellable *cancellable);
628 GFileInfo * g_file_query_info (GFile *file,
629 const char *attributes,
630 GFileQueryInfoFlags flags,
631 GCancellable *cancellable,
633 void g_file_query_info_async (GFile *file,
634 const char *attributes,
635 GFileQueryInfoFlags flags,
637 GCancellable *cancellable,
638 GAsyncReadyCallback callback,
640 GFileInfo * g_file_query_info_finish (GFile *file,
643 GFileInfo * g_file_query_filesystem_info (GFile *file,
644 const char *attributes,
645 GCancellable *cancellable,
647 GMount * g_file_find_enclosing_mount (GFile *file,
648 GCancellable *cancellable,
650 void g_file_find_enclosing_mount_async (GFile *file,
652 GCancellable *cancellable,
653 GAsyncReadyCallback callback,
655 GMount * g_file_find_enclosing_mount_finish (GFile *file,
658 GFileEnumerator * g_file_enumerate_children (GFile *file,
659 const char *attributes,
660 GFileQueryInfoFlags flags,
661 GCancellable *cancellable,
663 void g_file_enumerate_children_async (GFile *file,
664 const char *attributes,
665 GFileQueryInfoFlags flags,
667 GCancellable *cancellable,
668 GAsyncReadyCallback callback,
670 GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
673 GFile * g_file_set_display_name (GFile *file,
674 const char *display_name,
675 GCancellable *cancellable,
677 void g_file_set_display_name_async (GFile *file,
678 const char *display_name,
680 GCancellable *cancellable,
681 GAsyncReadyCallback callback,
683 GFile * g_file_set_display_name_finish (GFile *file,
686 gboolean g_file_delete (GFile *file,
687 GCancellable *cancellable,
689 gboolean g_file_trash (GFile *file,
690 GCancellable *cancellable,
692 gboolean g_file_copy (GFile *source,
694 GFileCopyFlags flags,
695 GCancellable *cancellable,
696 GFileProgressCallback progress_callback,
697 gpointer progress_callback_data,
699 void g_file_copy_async (GFile *source,
701 GFileCopyFlags flags,
703 GCancellable *cancellable,
704 GFileProgressCallback progress_callback,
705 gpointer progress_callback_data,
706 GAsyncReadyCallback callback,
708 gboolean g_file_copy_finish (GFile *file,
711 gboolean g_file_move (GFile *source,
713 GFileCopyFlags flags,
714 GCancellable *cancellable,
715 GFileProgressCallback progress_callback,
716 gpointer progress_callback_data,
718 gboolean g_file_make_directory (GFile *file,
719 GCancellable *cancellable,
721 gboolean g_file_make_symbolic_link (GFile *file,
722 const char *symlink_value,
723 GCancellable *cancellable,
725 GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
726 GCancellable *cancellable,
728 GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
729 GCancellable *cancellable,
731 gboolean g_file_set_attribute (GFile *file,
732 const char *attribute,
733 GFileAttributeType type,
735 GFileQueryInfoFlags flags,
736 GCancellable *cancellable,
738 gboolean g_file_set_attributes_from_info (GFile *file,
740 GFileQueryInfoFlags flags,
741 GCancellable *cancellable,
743 void g_file_set_attributes_async (GFile *file,
745 GFileQueryInfoFlags flags,
747 GCancellable *cancellable,
748 GAsyncReadyCallback callback,
750 gboolean g_file_set_attributes_finish (GFile *file,
751 GAsyncResult *result,
754 gboolean g_file_set_attribute_string (GFile *file,
755 const char *attribute,
757 GFileQueryInfoFlags flags,
758 GCancellable *cancellable,
760 gboolean g_file_set_attribute_byte_string (GFile *file,
761 const char *attribute,
763 GFileQueryInfoFlags flags,
764 GCancellable *cancellable,
766 gboolean g_file_set_attribute_uint32 (GFile *file,
767 const char *attribute,
769 GFileQueryInfoFlags flags,
770 GCancellable *cancellable,
772 gboolean g_file_set_attribute_int32 (GFile *file,
773 const char *attribute,
775 GFileQueryInfoFlags flags,
776 GCancellable *cancellable,
778 gboolean g_file_set_attribute_uint64 (GFile *file,
779 const char *attribute,
781 GFileQueryInfoFlags flags,
782 GCancellable *cancellable,
784 gboolean g_file_set_attribute_int64 (GFile *file,
785 const char *attribute,
787 GFileQueryInfoFlags flags,
788 GCancellable *cancellable,
790 void g_file_mount_enclosing_volume (GFile *location,
791 GMountOperation *mount_operation,
792 GCancellable *cancellable,
793 GAsyncReadyCallback callback,
795 gboolean g_file_mount_enclosing_volume_finish (GFile *location,
796 GAsyncResult *result,
798 void g_file_mount_mountable (GFile *file,
799 GMountOperation *mount_operation,
800 GCancellable *cancellable,
801 GAsyncReadyCallback callback,
803 GFile * g_file_mount_mountable_finish (GFile *file,
804 GAsyncResult *result,
806 void g_file_unmount_mountable (GFile *file,
807 GMountUnmountFlags flags,
808 GCancellable *cancellable,
809 GAsyncReadyCallback callback,
811 gboolean g_file_unmount_mountable_finish (GFile *file,
812 GAsyncResult *result,
814 void g_file_eject_mountable (GFile *file,
815 GMountUnmountFlags flags,
816 GCancellable *cancellable,
817 GAsyncReadyCallback callback,
819 gboolean g_file_eject_mountable_finish (GFile *file,
820 GAsyncResult *result,
823 gboolean g_file_copy_attributes (GFile *source,
825 GFileCopyFlags flags,
826 GCancellable *cancellable,
830 GFileMonitor* g_file_monitor_directory (GFile *file,
831 GFileMonitorFlags flags,
832 GCancellable *cancellable,
834 GFileMonitor* g_file_monitor_file (GFile *file,
835 GFileMonitorFlags flags,
836 GCancellable *cancellable,
842 GAppInfo *g_file_query_default_handler (GFile *file,
843 GCancellable *cancellable,
845 gboolean g_file_load_contents (GFile *file,
846 GCancellable *cancellable,
851 void g_file_load_contents_async (GFile *file,
852 GCancellable *cancellable,
853 GAsyncReadyCallback callback,
855 gboolean g_file_load_contents_finish (GFile *file,
861 void g_file_load_partial_contents_async (GFile *file,
862 GCancellable *cancellable,
863 GFileReadMoreCallback read_more_callback,
864 GAsyncReadyCallback callback,
866 gboolean g_file_load_partial_contents_finish (GFile *file,
872 gboolean g_file_replace_contents (GFile *file,
873 const char *contents,
876 gboolean make_backup,
877 GFileCreateFlags flags,
879 GCancellable *cancellable,
881 void g_file_replace_contents_async (GFile *file,
882 const char *contents,
885 gboolean make_backup,
886 GFileCreateFlags flags,
887 GCancellable *cancellable,
888 GAsyncReadyCallback callback,
890 gboolean g_file_replace_contents_finish (GFile *file,
897 #endif /* __G_FILE_H__ */