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)
73 * @G_MOUNT_MOUNT_NONE: No flags set.
75 * Flags used when mounting a mount.
78 G_MOUNT_MOUNT_NONE = 0
84 * @G_MOUNT_UNMOUNT_NONE: No flags set.
85 * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding
86 * file operations on the mount.
88 * Flags used when an unmounting a mount.
91 G_MOUNT_UNMOUNT_NONE = 0,
92 G_MOUNT_UNMOUNT_FORCE = (1<<0)
97 * @G_FILE_COPY_NONE: No flags set.
98 * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
99 * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
100 * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
101 * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
102 * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
104 * Flags used when copying or moving files.
107 G_FILE_COPY_NONE = 0, /*< nick=none >*/
108 G_FILE_COPY_OVERWRITE = (1<<0),
109 G_FILE_COPY_BACKUP = (1<<1),
110 G_FILE_COPY_NOFOLLOW_SYMLINKS = (1<<2),
111 G_FILE_COPY_ALL_METADATA = (1<<3),
112 G_FILE_COPY_NO_FALLBACK_FOR_MOVE = (1<<4)
117 * @G_FILE_MONITOR_NONE: No flags set.
118 * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
120 * Flags used to set what a #GFileMonitor will watch for.
123 G_FILE_MONITOR_NONE = 0,
124 G_FILE_MONITOR_WATCH_MOUNTS = (1<<0)
130 * A handle to an object implementing the #GFileIface interface.
131 * Generally stores a location within the file system. Handles do not
132 * necessarily represent files or directories that currently exist.
134 typedef struct _GFile GFile; /* Dummy typedef */
135 typedef struct _GFileIface GFileIface;
136 typedef struct _GFileMonitor GFileMonitor;
141 * A handle to an object implementing the #GMountIface interface.
143 typedef struct _GMount GMount; /* Dummy typedef */
146 * GFileProgressCallback:
147 * @current_num_bytes: the current number of bytes in the operation.
148 * @total_num_bytes: the total number of bytes in the operation.
149 * @user_data: user data passed to the callback.
151 * When doing file operations that may take a while, such as moving
152 * a file or copying a file, a progress callback is used to pass how
153 * far along that operation is to the application.
155 typedef void (*GFileProgressCallback) (goffset current_num_bytes,
156 goffset total_num_bytes,
160 * GFileReadMoreCallback:
161 * @file_contents: the data as currently read.
162 * @file_size: the size of the data currently read.
163 * @callback_data: data passed to the callback.
165 * When loading the partial contents of a file with g_file_read_partial_contents(),
166 * it may become necessary to determine if any more data from the file should be loaded.
167 * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
168 * should be read, or %FALSE otherwise.
170 * Returns: %TRUE if more data should be read back. %FALSE otherwise.
172 typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
174 gpointer callback_data);
178 * @g_iface: The parent interface.
179 * @dup: Duplicates a #GFile.
180 * @hash: Creates a hash of a #GFile.
181 * @equal: Checks equality of two given #GFile<!-- -->s.
182 * @is_native: Checks to see if a file is native to the system.
183 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
184 * @get_uri_scheme: Gets the URI scheme for a #GFile.
185 * @get_basename: Gets the basename for a given #GFile.
186 * @get_path: Gets the current path within a #GFile.
187 * @get_uri: Gets a URI for the path within a #GFile.
188 * @get_parse_name: Gets the parsed name for the #GFile.
189 * @get_parent: Gets the parent directory for the #GFile.
190 * @prefix_matches: Checks whether a #GFile contains a specified file.
191 * @get_relative_path: Gets the path for a #GFile relative to a given path.
192 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
193 * @get_child_for_display_name: Gets the child #GFile for a given display name.
194 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
195 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
196 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
197 * @query_info: Gets the #GFileInfo for a #GFile.
198 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
199 * @query_info_finish: Finishes an asynchronous query info operation.
200 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
201 * @_query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
202 * @_query_filesystem_info_finish: Finishes asynchronously getting the file system info.
203 * @find_enclosing_mount: Gets a #GMount for the #GFile.
204 * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
205 * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
206 * @set_display_name: Sets the display name for a #GFile.
207 * @set_display_name_async: Asynchronously sets a #GFile's display name.
208 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
209 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
210 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
211 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
212 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
213 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
214 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
215 * @set_attribute: Sets a #GFileAttribute.
216 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
217 * @set_attributes_async: Asynchronously sets a file's attributes.
218 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
219 * @read_fn: Reads a file asynchronously.
220 * @read_async: Asynchronously reads a file.
221 * @read_finish: Finishes asynchronously reading a file.
222 * @append_to: Writes to the end of a file.
223 * @append_to_async: Asynchronously writes to the end of a file.
224 * @append_to_finish: Finishes an asynchronous file append operation.
225 * @create: Creates a new file.
226 * @create_async: Asynchronously creates a file.
227 * @create_finish: Finishes asynchronously creating a file.
228 * @replace: Replaces the contents of a file.
229 * @replace_async: Asynchronously replaces the contents of a file.
230 * @replace_finish: Finishes asynchronously replacing a file.
231 * @delete_file: Deletes a file.
232 * @_delete_file_async: Asynchronously deletes a file.
233 * @_delete_file_finish: Finishes an asynchronous delete.
234 * @trash: Sends a #GFile to the Trash location.
235 * @_trash_async: Asynchronously sends a #GFile to the Trash location.
236 * @_trash_finish: Finishes an asynchronous file trashing operation.
237 * @make_directory: Makes a directory.
238 * @_make_directory_async: Asynchronously makes a directory.
239 * @_make_directory_finish: Finishes making a directory asynchronously.
240 * @make_symbolic_link: Makes a symbolic link.
241 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
242 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
243 * @copy: Copies a file.
244 * @copy_async: Asynchronously copies a file.
245 * @copy_finish: Finishes an asynchronous copy operation.
246 * @move: Moves a file.
247 * @_move_async: Asynchronously moves a file.
248 * @_move_finish: Finishes an asynchronous move operation.
249 * @mount_mountable: Mounts a mountable object.
250 * @mount_mountable_finish: Finishes a mounting operation.
251 * @unmount_mountable: Unmounts a mountable object.
252 * @unmount_mountable_finish: Finishes an unmount operation.
253 * @eject_mountable: Ejects a mountable.
254 * @eject_mountable_finish: Finishes an eject operation.
255 * @mount_enclosing_volume: Mounts a specified location.
256 * @mount_enclosing_volume_finish: Finishes mounting a specified location.
257 * @monitor_dir: Creates a #GFileMonitor for the location.
258 * @monitor_file: Creates a #GFileMonitor for the location.
260 * An interface for writing VFS file handles.
264 GTypeInterface g_iface;
268 GFile * (*dup) (GFile *file);
269 guint (*hash) (GFile *file);
270 gboolean (*equal) (GFile *file1,
272 gboolean (*is_native) (GFile *file);
273 gboolean (*has_uri_scheme) (GFile *file,
274 const char *uri_scheme);
275 char * (*get_uri_scheme) (GFile *file);
276 char * (*get_basename) (GFile *file);
277 char * (*get_path) (GFile *file);
278 char * (*get_uri) (GFile *file);
279 char * (*get_parse_name) (GFile *file);
280 GFile * (*get_parent) (GFile *file);
281 gboolean (*prefix_matches) (GFile *prefix,
283 char * (*get_relative_path) (GFile *parent,
285 GFile * (*resolve_relative_path) (GFile *file,
286 const char *relative_path);
287 GFile * (*get_child_for_display_name) (GFile *file,
288 const char *display_name,
291 GFileEnumerator * (*enumerate_children) (GFile *file,
292 const char *attributes,
293 GFileQueryInfoFlags flags,
294 GCancellable *cancellable,
296 void (*enumerate_children_async) (GFile *file,
297 const char *attributes,
298 GFileQueryInfoFlags flags,
300 GCancellable *cancellable,
301 GAsyncReadyCallback callback,
303 GFileEnumerator * (*enumerate_children_finish) (GFile *file,
307 GFileInfo * (*query_info) (GFile *file,
308 const char *attributes,
309 GFileQueryInfoFlags flags,
310 GCancellable *cancellable,
312 void (*query_info_async) (GFile *file,
313 const char *attributes,
314 GFileQueryInfoFlags flags,
316 GCancellable *cancellable,
317 GAsyncReadyCallback callback,
319 GFileInfo * (*query_info_finish) (GFile *file,
323 GFileInfo * (*query_filesystem_info)(GFile *file,
324 const char *attributes,
325 GCancellable *cancellable,
327 void (*_query_filesystem_info_async) (void);
328 void (*_query_filesystem_info_finish) (void);
330 GMount * (*find_enclosing_mount)(GFile *file,
331 GCancellable *cancellable,
333 void (*find_enclosing_mount_async)(GFile *file,
335 GCancellable *cancellable,
336 GAsyncReadyCallback callback,
338 GMount * (*find_enclosing_mount_finish)(GFile *file,
342 GFile * (*set_display_name) (GFile *file,
343 const char *display_name,
344 GCancellable *cancellable,
346 void (*set_display_name_async) (GFile *file,
347 const char *display_name,
349 GCancellable *cancellable,
350 GAsyncReadyCallback callback,
352 GFile * (*set_display_name_finish) (GFile *file,
356 GFileAttributeInfoList * (*query_settable_attributes) (GFile *file,
357 GCancellable *cancellable,
359 void (*_query_settable_attributes_async) (void);
360 void (*_query_settable_attributes_finish) (void);
362 GFileAttributeInfoList * (*query_writable_namespaces) (GFile *file,
363 GCancellable *cancellable,
365 void (*_query_writable_namespaces_async) (void);
366 void (*_query_writable_namespaces_finish) (void);
368 gboolean (*set_attribute) (GFile *file,
369 const char *attribute,
370 GFileAttributeType type,
372 GFileQueryInfoFlags flags,
373 GCancellable *cancellable,
375 gboolean (*set_attributes_from_info) (GFile *file,
377 GFileQueryInfoFlags flags,
378 GCancellable *cancellable,
380 void (*set_attributes_async) (GFile *file,
382 GFileQueryInfoFlags flags,
384 GCancellable *cancellable,
385 GAsyncReadyCallback callback,
387 gboolean (*set_attributes_finish) (GFile *file,
388 GAsyncResult *result,
392 GFileInputStream * (*read_fn) (GFile *file,
393 GCancellable *cancellable,
395 void (*read_async) (GFile *file,
397 GCancellable *cancellable,
398 GAsyncReadyCallback callback,
400 GFileInputStream * (*read_finish) (GFile *file,
404 GFileOutputStream * (*append_to) (GFile *file,
405 GFileCreateFlags flags,
406 GCancellable *cancellable,
408 void (*append_to_async) (GFile *file,
409 GFileCreateFlags flags,
411 GCancellable *cancellable,
412 GAsyncReadyCallback callback,
414 GFileOutputStream * (*append_to_finish) (GFile *file,
418 GFileOutputStream * (*create) (GFile *file,
419 GFileCreateFlags flags,
420 GCancellable *cancellable,
422 void (*create_async) (GFile *file,
423 GFileCreateFlags flags,
425 GCancellable *cancellable,
426 GAsyncReadyCallback callback,
428 GFileOutputStream * (*create_finish) (GFile *file,
432 GFileOutputStream * (*replace) (GFile *file,
434 gboolean make_backup,
435 GFileCreateFlags flags,
436 GCancellable *cancellable,
438 void (*replace_async) (GFile *file,
440 gboolean make_backup,
441 GFileCreateFlags flags,
443 GCancellable *cancellable,
444 GAsyncReadyCallback callback,
446 GFileOutputStream * (*replace_finish) (GFile *file,
450 gboolean (*delete_file) (GFile *file,
451 GCancellable *cancellable,
453 void (*_delete_file_async) (void);
454 void (*_delete_file_finish) (void);
456 gboolean (*trash) (GFile *file,
457 GCancellable *cancellable,
459 void (*_trash_async) (void);
460 void (*_trash_finish) (void);
462 gboolean (*make_directory) (GFile *file,
463 GCancellable *cancellable,
465 void (*_make_directory_async) (void);
466 void (*_make_directory_finish) (void);
468 gboolean (*make_symbolic_link) (GFile *file,
469 const char *symlink_value,
470 GCancellable *cancellable,
472 void (*_make_symbolic_link_async) (void);
473 void (*_make_symbolic_link_finish) (void);
475 gboolean (*copy) (GFile *source,
477 GFileCopyFlags flags,
478 GCancellable *cancellable,
479 GFileProgressCallback progress_callback,
480 gpointer progress_callback_data,
482 void (*copy_async) (GFile *source,
484 GFileCopyFlags flags,
486 GCancellable *cancellable,
487 GFileProgressCallback progress_callback,
488 gpointer progress_callback_data,
489 GAsyncReadyCallback callback,
491 gboolean (*copy_finish) (GFile *file,
495 gboolean (*move) (GFile *source,
497 GFileCopyFlags flags,
498 GCancellable *cancellable,
499 GFileProgressCallback progress_callback,
500 gpointer progress_callback_data,
503 void (*_move_async) (void);
504 void (*_move_finish) (void);
507 void (*mount_mountable) (GFile *file,
508 GMountMountFlags flags,
509 GMountOperation *mount_operation,
510 GCancellable *cancellable,
511 GAsyncReadyCallback callback,
513 GFile * (*mount_mountable_finish) (GFile *file,
514 GAsyncResult *result,
516 void (*unmount_mountable) (GFile *file,
517 GMountUnmountFlags flags,
518 GCancellable *cancellable,
519 GAsyncReadyCallback callback,
521 gboolean (*unmount_mountable_finish) (GFile *file,
522 GAsyncResult *result,
524 void (*eject_mountable) (GFile *file,
525 GMountUnmountFlags flags,
526 GCancellable *cancellable,
527 GAsyncReadyCallback callback,
529 gboolean (*eject_mountable_finish) (GFile *file,
530 GAsyncResult *result,
534 void (*mount_enclosing_volume) (GFile *location,
535 GMountMountFlags flags,
536 GMountOperation *mount_operation,
537 GCancellable *cancellable,
538 GAsyncReadyCallback callback,
540 gboolean (*mount_enclosing_volume_finish) (GFile *location,
541 GAsyncResult *result,
544 GFileMonitor* (*monitor_dir) (GFile *file,
545 GFileMonitorFlags flags,
546 GCancellable *cancellable,
549 GFileMonitor* (*monitor_file) (GFile *file,
550 GFileMonitorFlags flags,
551 GCancellable *cancellable,
556 GType g_file_get_type (void) G_GNUC_CONST;
558 GFile * g_file_new_for_path (const char *path);
559 GFile * g_file_new_for_uri (const char *uri);
560 GFile * g_file_new_for_commandline_arg (const char *arg);
561 GFile * g_file_parse_name (const char *parse_name);
562 GFile * g_file_dup (GFile *file);
563 guint g_file_hash (gconstpointer file);
564 gboolean g_file_equal (GFile *file1,
566 char * g_file_get_basename (GFile *file);
567 char * g_file_get_path (GFile *file);
568 char * g_file_get_uri (GFile *file);
569 char * g_file_get_parse_name (GFile *file);
570 GFile * g_file_get_parent (GFile *file);
571 GFile * g_file_get_child (GFile *file,
573 GFile * g_file_get_child_for_display_name (GFile *file,
574 const char *display_name,
576 #ifndef G_DISABLE_DEPRECATED
577 #define g_file_contains_file(_parent, _child) g_file_has_prefix (_child, _parent)
579 gboolean g_file_has_prefix (GFile *file,
581 char * g_file_get_relative_path (GFile *parent,
583 GFile * g_file_resolve_relative_path (GFile *file,
584 const char *relative_path);
585 gboolean g_file_is_native (GFile *file);
586 gboolean g_file_has_uri_scheme (GFile *file,
587 const char *uri_scheme);
588 char * g_file_get_uri_scheme (GFile *file);
589 GFileInputStream * g_file_read (GFile *file,
590 GCancellable *cancellable,
592 void g_file_read_async (GFile *file,
594 GCancellable *cancellable,
595 GAsyncReadyCallback callback,
597 GFileInputStream * g_file_read_finish (GFile *file,
600 GFileOutputStream * g_file_append_to (GFile *file,
601 GFileCreateFlags flags,
602 GCancellable *cancellable,
604 GFileOutputStream * g_file_create (GFile *file,
605 GFileCreateFlags flags,
606 GCancellable *cancellable,
608 GFileOutputStream * g_file_replace (GFile *file,
610 gboolean make_backup,
611 GFileCreateFlags flags,
612 GCancellable *cancellable,
614 void g_file_append_to_async (GFile *file,
615 GFileCreateFlags flags,
617 GCancellable *cancellable,
618 GAsyncReadyCallback callback,
620 GFileOutputStream * g_file_append_to_finish (GFile *file,
623 void g_file_create_async (GFile *file,
624 GFileCreateFlags flags,
626 GCancellable *cancellable,
627 GAsyncReadyCallback callback,
629 GFileOutputStream * g_file_create_finish (GFile *file,
632 void g_file_replace_async (GFile *file,
634 gboolean make_backup,
635 GFileCreateFlags flags,
637 GCancellable *cancellable,
638 GAsyncReadyCallback callback,
640 GFileOutputStream * g_file_replace_finish (GFile *file,
643 gboolean g_file_query_exists (GFile *file,
644 GCancellable *cancellable);
645 GFileInfo * g_file_query_info (GFile *file,
646 const char *attributes,
647 GFileQueryInfoFlags flags,
648 GCancellable *cancellable,
650 void g_file_query_info_async (GFile *file,
651 const char *attributes,
652 GFileQueryInfoFlags flags,
654 GCancellable *cancellable,
655 GAsyncReadyCallback callback,
657 GFileInfo * g_file_query_info_finish (GFile *file,
660 GFileInfo * g_file_query_filesystem_info (GFile *file,
661 const char *attributes,
662 GCancellable *cancellable,
664 GMount * g_file_find_enclosing_mount (GFile *file,
665 GCancellable *cancellable,
667 void g_file_find_enclosing_mount_async (GFile *file,
669 GCancellable *cancellable,
670 GAsyncReadyCallback callback,
672 GMount * g_file_find_enclosing_mount_finish (GFile *file,
675 GFileEnumerator * g_file_enumerate_children (GFile *file,
676 const char *attributes,
677 GFileQueryInfoFlags flags,
678 GCancellable *cancellable,
680 void g_file_enumerate_children_async (GFile *file,
681 const char *attributes,
682 GFileQueryInfoFlags flags,
684 GCancellable *cancellable,
685 GAsyncReadyCallback callback,
687 GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
690 GFile * g_file_set_display_name (GFile *file,
691 const char *display_name,
692 GCancellable *cancellable,
694 void g_file_set_display_name_async (GFile *file,
695 const char *display_name,
697 GCancellable *cancellable,
698 GAsyncReadyCallback callback,
700 GFile * g_file_set_display_name_finish (GFile *file,
703 gboolean g_file_delete (GFile *file,
704 GCancellable *cancellable,
706 gboolean g_file_trash (GFile *file,
707 GCancellable *cancellable,
709 gboolean g_file_copy (GFile *source,
711 GFileCopyFlags flags,
712 GCancellable *cancellable,
713 GFileProgressCallback progress_callback,
714 gpointer progress_callback_data,
716 void g_file_copy_async (GFile *source,
718 GFileCopyFlags flags,
720 GCancellable *cancellable,
721 GFileProgressCallback progress_callback,
722 gpointer progress_callback_data,
723 GAsyncReadyCallback callback,
725 gboolean g_file_copy_finish (GFile *file,
728 gboolean g_file_move (GFile *source,
730 GFileCopyFlags flags,
731 GCancellable *cancellable,
732 GFileProgressCallback progress_callback,
733 gpointer progress_callback_data,
735 gboolean g_file_make_directory (GFile *file,
736 GCancellable *cancellable,
738 gboolean g_file_make_symbolic_link (GFile *file,
739 const char *symlink_value,
740 GCancellable *cancellable,
742 GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
743 GCancellable *cancellable,
745 GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
746 GCancellable *cancellable,
748 gboolean g_file_set_attribute (GFile *file,
749 const char *attribute,
750 GFileAttributeType type,
752 GFileQueryInfoFlags flags,
753 GCancellable *cancellable,
755 gboolean g_file_set_attributes_from_info (GFile *file,
757 GFileQueryInfoFlags flags,
758 GCancellable *cancellable,
760 void g_file_set_attributes_async (GFile *file,
762 GFileQueryInfoFlags flags,
764 GCancellable *cancellable,
765 GAsyncReadyCallback callback,
767 gboolean g_file_set_attributes_finish (GFile *file,
768 GAsyncResult *result,
771 gboolean g_file_set_attribute_string (GFile *file,
772 const char *attribute,
774 GFileQueryInfoFlags flags,
775 GCancellable *cancellable,
777 gboolean g_file_set_attribute_byte_string (GFile *file,
778 const char *attribute,
780 GFileQueryInfoFlags flags,
781 GCancellable *cancellable,
783 gboolean g_file_set_attribute_uint32 (GFile *file,
784 const char *attribute,
786 GFileQueryInfoFlags flags,
787 GCancellable *cancellable,
789 gboolean g_file_set_attribute_int32 (GFile *file,
790 const char *attribute,
792 GFileQueryInfoFlags flags,
793 GCancellable *cancellable,
795 gboolean g_file_set_attribute_uint64 (GFile *file,
796 const char *attribute,
798 GFileQueryInfoFlags flags,
799 GCancellable *cancellable,
801 gboolean g_file_set_attribute_int64 (GFile *file,
802 const char *attribute,
804 GFileQueryInfoFlags flags,
805 GCancellable *cancellable,
807 void g_file_mount_enclosing_volume (GFile *location,
808 GMountMountFlags flags,
809 GMountOperation *mount_operation,
810 GCancellable *cancellable,
811 GAsyncReadyCallback callback,
813 gboolean g_file_mount_enclosing_volume_finish (GFile *location,
814 GAsyncResult *result,
816 void g_file_mount_mountable (GFile *file,
817 GMountMountFlags flags,
818 GMountOperation *mount_operation,
819 GCancellable *cancellable,
820 GAsyncReadyCallback callback,
822 GFile * g_file_mount_mountable_finish (GFile *file,
823 GAsyncResult *result,
825 void g_file_unmount_mountable (GFile *file,
826 GMountUnmountFlags flags,
827 GCancellable *cancellable,
828 GAsyncReadyCallback callback,
830 gboolean g_file_unmount_mountable_finish (GFile *file,
831 GAsyncResult *result,
833 void g_file_eject_mountable (GFile *file,
834 GMountUnmountFlags flags,
835 GCancellable *cancellable,
836 GAsyncReadyCallback callback,
838 gboolean g_file_eject_mountable_finish (GFile *file,
839 GAsyncResult *result,
842 gboolean g_file_copy_attributes (GFile *source,
844 GFileCopyFlags flags,
845 GCancellable *cancellable,
849 GFileMonitor* g_file_monitor_directory (GFile *file,
850 GFileMonitorFlags flags,
851 GCancellable *cancellable,
853 GFileMonitor* g_file_monitor_file (GFile *file,
854 GFileMonitorFlags flags,
855 GCancellable *cancellable,
861 GAppInfo *g_file_query_default_handler (GFile *file,
862 GCancellable *cancellable,
864 gboolean g_file_load_contents (GFile *file,
865 GCancellable *cancellable,
870 void g_file_load_contents_async (GFile *file,
871 GCancellable *cancellable,
872 GAsyncReadyCallback callback,
874 gboolean g_file_load_contents_finish (GFile *file,
880 void g_file_load_partial_contents_async (GFile *file,
881 GCancellable *cancellable,
882 GFileReadMoreCallback read_more_callback,
883 GAsyncReadyCallback callback,
885 gboolean g_file_load_partial_contents_finish (GFile *file,
891 gboolean g_file_replace_contents (GFile *file,
892 const char *contents,
895 gboolean make_backup,
896 GFileCreateFlags flags,
898 GCancellable *cancellable,
900 void g_file_replace_contents_async (GFile *file,
901 const char *contents,
904 gboolean make_backup,
905 GFileCreateFlags flags,
906 GCancellable *cancellable,
907 GAsyncReadyCallback callback,
909 gboolean g_file_replace_contents_finish (GFile *file,
916 #endif /* __G_FILE_H__ */