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 * @contains_file: 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 (*contains_file) (GFile *parent,
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 gboolean g_file_contains_file (GFile *parent,
578 char * g_file_get_relative_path (GFile *parent,
580 GFile * g_file_resolve_relative_path (GFile *file,
581 const char *relative_path);
582 gboolean g_file_is_native (GFile *file);
583 gboolean g_file_has_uri_scheme (GFile *file,
584 const char *uri_scheme);
585 char * g_file_get_uri_scheme (GFile *file);
586 GFileInputStream * g_file_read (GFile *file,
587 GCancellable *cancellable,
589 void g_file_read_async (GFile *file,
591 GCancellable *cancellable,
592 GAsyncReadyCallback callback,
594 GFileInputStream * g_file_read_finish (GFile *file,
597 GFileOutputStream * g_file_append_to (GFile *file,
598 GFileCreateFlags flags,
599 GCancellable *cancellable,
601 GFileOutputStream * g_file_create (GFile *file,
602 GFileCreateFlags flags,
603 GCancellable *cancellable,
605 GFileOutputStream * g_file_replace (GFile *file,
607 gboolean make_backup,
608 GFileCreateFlags flags,
609 GCancellable *cancellable,
611 void g_file_append_to_async (GFile *file,
612 GFileCreateFlags flags,
614 GCancellable *cancellable,
615 GAsyncReadyCallback callback,
617 GFileOutputStream * g_file_append_to_finish (GFile *file,
620 void g_file_create_async (GFile *file,
621 GFileCreateFlags flags,
623 GCancellable *cancellable,
624 GAsyncReadyCallback callback,
626 GFileOutputStream * g_file_create_finish (GFile *file,
629 void g_file_replace_async (GFile *file,
631 gboolean make_backup,
632 GFileCreateFlags flags,
634 GCancellable *cancellable,
635 GAsyncReadyCallback callback,
637 GFileOutputStream * g_file_replace_finish (GFile *file,
640 gboolean g_file_query_exists (GFile *file,
641 GCancellable *cancellable);
642 GFileInfo * g_file_query_info (GFile *file,
643 const char *attributes,
644 GFileQueryInfoFlags flags,
645 GCancellable *cancellable,
647 void g_file_query_info_async (GFile *file,
648 const char *attributes,
649 GFileQueryInfoFlags flags,
651 GCancellable *cancellable,
652 GAsyncReadyCallback callback,
654 GFileInfo * g_file_query_info_finish (GFile *file,
657 GFileInfo * g_file_query_filesystem_info (GFile *file,
658 const char *attributes,
659 GCancellable *cancellable,
661 GMount * g_file_find_enclosing_mount (GFile *file,
662 GCancellable *cancellable,
664 void g_file_find_enclosing_mount_async (GFile *file,
666 GCancellable *cancellable,
667 GAsyncReadyCallback callback,
669 GMount * g_file_find_enclosing_mount_finish (GFile *file,
672 GFileEnumerator * g_file_enumerate_children (GFile *file,
673 const char *attributes,
674 GFileQueryInfoFlags flags,
675 GCancellable *cancellable,
677 void g_file_enumerate_children_async (GFile *file,
678 const char *attributes,
679 GFileQueryInfoFlags flags,
681 GCancellable *cancellable,
682 GAsyncReadyCallback callback,
684 GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
687 GFile * g_file_set_display_name (GFile *file,
688 const char *display_name,
689 GCancellable *cancellable,
691 void g_file_set_display_name_async (GFile *file,
692 const char *display_name,
694 GCancellable *cancellable,
695 GAsyncReadyCallback callback,
697 GFile * g_file_set_display_name_finish (GFile *file,
700 gboolean g_file_delete (GFile *file,
701 GCancellable *cancellable,
703 gboolean g_file_trash (GFile *file,
704 GCancellable *cancellable,
706 gboolean g_file_copy (GFile *source,
708 GFileCopyFlags flags,
709 GCancellable *cancellable,
710 GFileProgressCallback progress_callback,
711 gpointer progress_callback_data,
713 void g_file_copy_async (GFile *source,
715 GFileCopyFlags flags,
717 GCancellable *cancellable,
718 GFileProgressCallback progress_callback,
719 gpointer progress_callback_data,
720 GAsyncReadyCallback callback,
722 gboolean g_file_copy_finish (GFile *file,
725 gboolean g_file_move (GFile *source,
727 GFileCopyFlags flags,
728 GCancellable *cancellable,
729 GFileProgressCallback progress_callback,
730 gpointer progress_callback_data,
732 gboolean g_file_make_directory (GFile *file,
733 GCancellable *cancellable,
735 gboolean g_file_make_symbolic_link (GFile *file,
736 const char *symlink_value,
737 GCancellable *cancellable,
739 GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
740 GCancellable *cancellable,
742 GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
743 GCancellable *cancellable,
745 gboolean g_file_set_attribute (GFile *file,
746 const char *attribute,
747 GFileAttributeType type,
749 GFileQueryInfoFlags flags,
750 GCancellable *cancellable,
752 gboolean g_file_set_attributes_from_info (GFile *file,
754 GFileQueryInfoFlags flags,
755 GCancellable *cancellable,
757 void g_file_set_attributes_async (GFile *file,
759 GFileQueryInfoFlags flags,
761 GCancellable *cancellable,
762 GAsyncReadyCallback callback,
764 gboolean g_file_set_attributes_finish (GFile *file,
765 GAsyncResult *result,
768 gboolean g_file_set_attribute_string (GFile *file,
769 const char *attribute,
771 GFileQueryInfoFlags flags,
772 GCancellable *cancellable,
774 gboolean g_file_set_attribute_byte_string (GFile *file,
775 const char *attribute,
777 GFileQueryInfoFlags flags,
778 GCancellable *cancellable,
780 gboolean g_file_set_attribute_uint32 (GFile *file,
781 const char *attribute,
783 GFileQueryInfoFlags flags,
784 GCancellable *cancellable,
786 gboolean g_file_set_attribute_int32 (GFile *file,
787 const char *attribute,
789 GFileQueryInfoFlags flags,
790 GCancellable *cancellable,
792 gboolean g_file_set_attribute_uint64 (GFile *file,
793 const char *attribute,
795 GFileQueryInfoFlags flags,
796 GCancellable *cancellable,
798 gboolean g_file_set_attribute_int64 (GFile *file,
799 const char *attribute,
801 GFileQueryInfoFlags flags,
802 GCancellable *cancellable,
804 void g_file_mount_enclosing_volume (GFile *location,
805 GMountMountFlags flags,
806 GMountOperation *mount_operation,
807 GCancellable *cancellable,
808 GAsyncReadyCallback callback,
810 gboolean g_file_mount_enclosing_volume_finish (GFile *location,
811 GAsyncResult *result,
813 void g_file_mount_mountable (GFile *file,
814 GMountMountFlags flags,
815 GMountOperation *mount_operation,
816 GCancellable *cancellable,
817 GAsyncReadyCallback callback,
819 GFile * g_file_mount_mountable_finish (GFile *file,
820 GAsyncResult *result,
822 void g_file_unmount_mountable (GFile *file,
823 GMountUnmountFlags flags,
824 GCancellable *cancellable,
825 GAsyncReadyCallback callback,
827 gboolean g_file_unmount_mountable_finish (GFile *file,
828 GAsyncResult *result,
830 void g_file_eject_mountable (GFile *file,
831 GMountUnmountFlags flags,
832 GCancellable *cancellable,
833 GAsyncReadyCallback callback,
835 gboolean g_file_eject_mountable_finish (GFile *file,
836 GAsyncResult *result,
839 gboolean g_file_copy_attributes (GFile *source,
841 GFileCopyFlags flags,
842 GCancellable *cancellable,
846 GFileMonitor* g_file_monitor_directory (GFile *file,
847 GFileMonitorFlags flags,
848 GCancellable *cancellable,
850 GFileMonitor* g_file_monitor_file (GFile *file,
851 GFileMonitorFlags flags,
852 GCancellable *cancellable,
858 GAppInfo *g_file_query_default_handler (GFile *file,
859 GCancellable *cancellable,
861 gboolean g_file_load_contents (GFile *file,
862 GCancellable *cancellable,
867 void g_file_load_contents_async (GFile *file,
868 GCancellable *cancellable,
869 GAsyncReadyCallback callback,
871 gboolean g_file_load_contents_finish (GFile *file,
877 void g_file_load_partial_contents_async (GFile *file,
878 GCancellable *cancellable,
879 GFileReadMoreCallback read_more_callback,
880 GAsyncReadyCallback callback,
882 gboolean g_file_load_partial_contents_finish (GFile *file,
888 gboolean g_file_replace_contents (GFile *file,
889 const char *contents,
892 gboolean make_backup,
893 GFileCreateFlags flags,
895 GCancellable *cancellable,
897 void g_file_replace_contents_async (GFile *file,
898 const char *contents,
901 gboolean make_backup,
902 GFileCreateFlags flags,
903 GCancellable *cancellable,
904 GAsyncReadyCallback callback,
906 gboolean g_file_replace_contents_finish (GFile *file,
913 #endif /* __G_FILE_H__ */