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>
39 #define G_TYPE_FILE (g_file_get_type ())
40 #define G_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE, GFile))
41 #define G_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE))
42 #define G_FILE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE, GFileIface))
45 * GFileQueryInfoFlags:
46 * @G_FILE_QUERY_INFO_NONE: No flags set.
47 * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
49 * Flags used when querying a #GFileInfo.
52 G_FILE_QUERY_INFO_NONE = 0,
53 G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1<<0) /*< nick=nofollow-symlinks >*/
54 } GFileQueryInfoFlags;
58 * @G_FILE_CREATE_NONE: No flags set.
59 * @G_FILE_CREATE_PRIVATE: Create a file that can only be
60 * accessed by the current user.
62 * Flags used when an operation may create a file.
65 G_FILE_CREATE_NONE = 0,
66 G_FILE_CREATE_PRIVATE = (1<<0)
71 * @G_MOUNT_UNMOUNT_NONE: No flags set.
72 * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding
73 * file operations on the mount.
75 * Flags used when an operation may create a file.
78 G_MOUNT_UNMOUNT_NONE = 0,
79 G_MOUNT_UNMOUNT_FORCE = (1<<0)
84 * @G_FILE_COPY_NONE: No flags set.
85 * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
86 * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
87 * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
88 * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
89 * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
91 * Flags used when copying or moving files.
94 G_FILE_COPY_NONE = 0, /*< nick=none >*/
95 G_FILE_COPY_OVERWRITE = (1<<0),
96 G_FILE_COPY_BACKUP = (1<<1),
97 G_FILE_COPY_NOFOLLOW_SYMLINKS = (1<<2),
98 G_FILE_COPY_ALL_METADATA = (1<<3),
99 G_FILE_COPY_NO_FALLBACK_FOR_MOVE = (1<<4)
104 * @G_FILE_MONITOR_NONE: No flags set.
105 * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
107 * Flags used to set what a #GFileMonitor will watch for.
110 G_FILE_MONITOR_NONE = 0,
111 G_FILE_MONITOR_WATCH_MOUNTS = (1<<0)
117 * A handle to an object implementing the #GFileIface interface.
118 * Generally stores a location within the file system. Handles do not
119 * necessarily represent files or directories that currently exist.
121 typedef struct _GFile GFile; /* Dummy typedef */
122 typedef struct _GFileIface GFileIface;
123 typedef struct _GFileMonitor GFileMonitor;
128 * A handle to an object implementing the #GMountIface interface.
130 typedef struct _GMount GMount; /* Dummy typedef */
133 * GFileProgressCallback:
134 * @current_num_bytes: the current number of bytes in the operation.
135 * @total_num_bytes: the total number of bytes in the operation.
136 * @user_data: user data passed to the callback.
138 * When doing file operations that may take a while, such as moving
139 * a file or copying a file, a progress callback is used to pass how
140 * far along that operation is to the application.
142 typedef void (*GFileProgressCallback) (goffset current_num_bytes,
143 goffset total_num_bytes,
147 * GFileReadMoreCallback:
148 * @file_contents: the data as currently read.
149 * @file_size: the size of the data currently read.
150 * @callback_data: data passed to the callback.
152 * When loading the partial contents of a file with g_file_read_partial_contents(),
153 * it may become necessary to determine if any more data from the file should be loaded.
154 * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
155 * should be read, or %FALSE otherwise.
157 * Returns: %TRUE if more data should be read back. %FALSE otherwise.
159 typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
161 gpointer callback_data);
165 * @g_iface: The parent interface.
166 * @dup: Duplicates a #GFile.
167 * @hash: Creates a hash of a #GFile.
168 * @equal: Checks equality of two given #GFile<!-- -->s.
169 * @is_native: Checks to see if a file is native to the system.
170 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
171 * @get_uri_scheme: Gets the URI scheme for a #GFile.
172 * @get_basename: Gets the basename for a given #GFile.
173 * @get_path: Gets the current path within a #GFile.
174 * @get_uri: Gets a URI for the path within a #GFile.
175 * @get_parse_name: Gets the parsed name for the #GFile.
176 * @get_parent: Gets the parent directory for the #GFile.
177 * @contains_file: Checks whether a #GFile contains a specified file.
178 * @get_relative_path: Gets the path for a #GFile relative to a given path.
179 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
180 * @get_child_for_display_name: Gets the child #GFile for a given display name.
181 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
182 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
183 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
184 * @query_info: Gets the #GFileInfo for a #GFile.
185 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
186 * @query_info_finish: Finishes an asynchronous query info operation.
187 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
188 * @_query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
189 * @_query_filesystem_info_finish: Finishes asynchronously getting the file system info.
190 * @find_enclosing_mount: Gets a #GMount for the #GFile.
191 * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
192 * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
193 * @set_display_name: Sets the display name for a #GFile.
194 * @set_display_name_async: Asynchronously sets a #GFile's display name.
195 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
196 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
197 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
198 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
199 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
200 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
201 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
202 * @set_attribute: Sets a #GFileAttribute.
203 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
204 * @set_attributes_async: Asynchronously sets a file's attributes.
205 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
206 * @read_fn: Reads a file asynchronously.
207 * @read_async: Asynchronously reads a file.
208 * @read_finish: Finishes asynchronously reading a file.
209 * @append_to: Writes to the end of a file.
210 * @append_to_async: Asynchronously writes to the end of a file.
211 * @append_to_finish: Finishes an asynchronous file append operation.
212 * @create: Creates a new file.
213 * @create_async: Asynchronously creates a file.
214 * @create_finish: Finishes asynchronously creating a file.
215 * @replace: Replaces the contents of a file.
216 * @replace_async: Asynchronously replaces the contents of a file.
217 * @replace_finish: Finishes asynchronously replacing a file.
218 * @delete_file: Deletes a file.
219 * @_delete_file_async: Asynchronously deletes a file.
220 * @_delete_file_finish: Finishes an asynchronous delete.
221 * @trash: Sends a #GFile to the Trash location.
222 * @_trash_async: Asynchronously sends a #GFile to the Trash location.
223 * @_trash_finish: Finishes an asynchronous file trashing operation.
224 * @make_directory: Makes a directory.
225 * @_make_directory_async: Asynchronously makes a directory.
226 * @_make_directory_finish: Finishes making a directory asynchronously.
227 * @make_symbolic_link: Makes a symbolic link.
228 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
229 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
230 * @copy: Copies a file.
231 * @_copy_async: Asynchronously copies a file.
232 * @_copy_finish: Finishes an asynchronous copy operation.
233 * @move: Moves a file.
234 * @_move_async: Asynchronously moves a file.
235 * @_move_finish: Finishes an asynchronous move operation.
236 * @mount_mountable: Mounts a mountable object.
237 * @mount_mountable_finish: Finishes a mounting operation.
238 * @unmount_mountable: Unmounts a mountable object.
239 * @unmount_mountable_finish: Finishes an unmount operation.
240 * @eject_mountable: Ejects a mountable.
241 * @eject_mountable_finish: Finishes an eject operation.
242 * @mount_enclosing_volume: Mounts a specified location.
243 * @mount_enclosing_volume_finish: Finishes mounting a specified location.
244 * @monitor_dir: Creates a #GFileMonitor for the location.
245 * @monitor_file: Creates a #GFileMonitor for the location.
247 * An interface for writing VFS file handles.
251 GTypeInterface g_iface;
255 GFile * (*dup) (GFile *file);
256 guint (*hash) (GFile *file);
257 gboolean (*equal) (GFile *file1,
259 gboolean (*is_native) (GFile *file);
260 gboolean (*has_uri_scheme) (GFile *file,
261 const char *uri_scheme);
262 char * (*get_uri_scheme) (GFile *file);
263 char * (*get_basename) (GFile *file);
264 char * (*get_path) (GFile *file);
265 char * (*get_uri) (GFile *file);
266 char * (*get_parse_name) (GFile *file);
267 GFile * (*get_parent) (GFile *file);
268 gboolean (*contains_file) (GFile *parent,
270 char * (*get_relative_path) (GFile *parent,
272 GFile * (*resolve_relative_path) (GFile *file,
273 const char *relative_path);
274 GFile * (*get_child_for_display_name) (GFile *file,
275 const char *display_name,
278 GFileEnumerator * (*enumerate_children) (GFile *file,
279 const char *attributes,
280 GFileQueryInfoFlags flags,
281 GCancellable *cancellable,
283 void (*enumerate_children_async) (GFile *file,
284 const char *attributes,
285 GFileQueryInfoFlags flags,
287 GCancellable *cancellable,
288 GAsyncReadyCallback callback,
290 GFileEnumerator * (*enumerate_children_finish) (GFile *file,
294 GFileInfo * (*query_info) (GFile *file,
295 const char *attributes,
296 GFileQueryInfoFlags flags,
297 GCancellable *cancellable,
299 void (*query_info_async) (GFile *file,
300 const char *attributes,
301 GFileQueryInfoFlags flags,
303 GCancellable *cancellable,
304 GAsyncReadyCallback callback,
306 GFileInfo * (*query_info_finish) (GFile *file,
310 GFileInfo * (*query_filesystem_info)(GFile *file,
311 const char *attributes,
312 GCancellable *cancellable,
314 void (*_query_filesystem_info_async) (void);
315 void (*_query_filesystem_info_finish) (void);
317 GMount * (*find_enclosing_mount)(GFile *file,
318 GCancellable *cancellable,
320 void (*find_enclosing_mount_async)(GFile *file,
322 GCancellable *cancellable,
323 GAsyncReadyCallback callback,
325 GMount * (*find_enclosing_mount_finish)(GFile *file,
329 GFile * (*set_display_name) (GFile *file,
330 const char *display_name,
331 GCancellable *cancellable,
333 void (*set_display_name_async) (GFile *file,
334 const char *display_name,
336 GCancellable *cancellable,
337 GAsyncReadyCallback callback,
339 GFile * (*set_display_name_finish) (GFile *file,
343 GFileAttributeInfoList * (*query_settable_attributes) (GFile *file,
344 GCancellable *cancellable,
346 void (*_query_settable_attributes_async) (void);
347 void (*_query_settable_attributes_finish) (void);
349 GFileAttributeInfoList * (*query_writable_namespaces) (GFile *file,
350 GCancellable *cancellable,
352 void (*_query_writable_namespaces_async) (void);
353 void (*_query_writable_namespaces_finish) (void);
355 gboolean (*set_attribute) (GFile *file,
356 const char *attribute,
357 GFileAttributeType type,
359 GFileQueryInfoFlags flags,
360 GCancellable *cancellable,
362 gboolean (*set_attributes_from_info) (GFile *file,
364 GFileQueryInfoFlags flags,
365 GCancellable *cancellable,
367 void (*set_attributes_async) (GFile *file,
369 GFileQueryInfoFlags flags,
371 GCancellable *cancellable,
372 GAsyncReadyCallback callback,
374 gboolean (*set_attributes_finish) (GFile *file,
375 GAsyncResult *result,
379 GFileInputStream * (*read_fn) (GFile *file,
380 GCancellable *cancellable,
382 void (*read_async) (GFile *file,
384 GCancellable *cancellable,
385 GAsyncReadyCallback callback,
387 GFileInputStream * (*read_finish) (GFile *file,
391 GFileOutputStream * (*append_to) (GFile *file,
392 GFileCreateFlags flags,
393 GCancellable *cancellable,
395 void (*append_to_async) (GFile *file,
396 GFileCreateFlags flags,
398 GCancellable *cancellable,
399 GAsyncReadyCallback callback,
401 GFileOutputStream * (*append_to_finish) (GFile *file,
405 GFileOutputStream * (*create) (GFile *file,
406 GFileCreateFlags flags,
407 GCancellable *cancellable,
409 void (*create_async) (GFile *file,
410 GFileCreateFlags flags,
412 GCancellable *cancellable,
413 GAsyncReadyCallback callback,
415 GFileOutputStream * (*create_finish) (GFile *file,
419 GFileOutputStream * (*replace) (GFile *file,
421 gboolean make_backup,
422 GFileCreateFlags flags,
423 GCancellable *cancellable,
425 void (*replace_async) (GFile *file,
427 gboolean make_backup,
428 GFileCreateFlags flags,
430 GCancellable *cancellable,
431 GAsyncReadyCallback callback,
433 GFileOutputStream * (*replace_finish) (GFile *file,
437 gboolean (*delete_file) (GFile *file,
438 GCancellable *cancellable,
440 void (*_delete_file_async) (void);
441 void (*_delete_file_finish) (void);
443 gboolean (*trash) (GFile *file,
444 GCancellable *cancellable,
446 void (*_trash_async) (void);
447 void (*_trash_finish) (void);
449 gboolean (*make_directory) (GFile *file,
450 GCancellable *cancellable,
452 void (*_make_directory_async) (void);
453 void (*_make_directory_finish) (void);
455 gboolean (*make_symbolic_link) (GFile *file,
456 const char *symlink_value,
457 GCancellable *cancellable,
459 void (*_make_symbolic_link_async) (void);
460 void (*_make_symbolic_link_finish) (void);
462 gboolean (*copy) (GFile *source,
464 GFileCopyFlags flags,
465 GCancellable *cancellable,
466 GFileProgressCallback progress_callback,
467 gpointer progress_callback_data,
469 void (*_copy_async) (void);
470 void (*_copy_finish) (void);
472 gboolean (*move) (GFile *source,
474 GFileCopyFlags flags,
475 GCancellable *cancellable,
476 GFileProgressCallback progress_callback,
477 gpointer progress_callback_data,
480 void (*_move_async) (void);
481 void (*_move_finish) (void);
484 void (*mount_mountable) (GFile *file,
485 GMountOperation *mount_operation,
486 GCancellable *cancellable,
487 GAsyncReadyCallback callback,
489 GFile * (*mount_mountable_finish) (GFile *file,
490 GAsyncResult *result,
492 void (*unmount_mountable) (GFile *file,
493 GMountUnmountFlags flags,
494 GCancellable *cancellable,
495 GAsyncReadyCallback callback,
497 gboolean (*unmount_mountable_finish) (GFile *file,
498 GAsyncResult *result,
500 void (*eject_mountable) (GFile *file,
501 GMountUnmountFlags flags,
502 GCancellable *cancellable,
503 GAsyncReadyCallback callback,
505 gboolean (*eject_mountable_finish) (GFile *file,
506 GAsyncResult *result,
510 void (*mount_enclosing_volume) (GFile *location,
511 GMountOperation *mount_operation,
512 GCancellable *cancellable,
513 GAsyncReadyCallback callback,
515 gboolean (*mount_enclosing_volume_finish) (GFile *location,
516 GAsyncResult *result,
519 GFileMonitor* (*monitor_dir) (GFile *file,
520 GFileMonitorFlags flags,
521 GCancellable *cancellable);
523 GFileMonitor* (*monitor_file) (GFile *file,
524 GFileMonitorFlags flags,
525 GCancellable *cancellable);
529 GType g_file_get_type (void) G_GNUC_CONST;
531 GFile * g_file_new_for_path (const char *path);
532 GFile * g_file_new_for_uri (const char *uri);
533 GFile * g_file_new_for_commandline_arg (const char *arg);
534 GFile * g_file_parse_name (const char *parse_name);
535 GFile * g_file_dup (GFile *file);
536 guint g_file_hash (gconstpointer file);
537 gboolean g_file_equal (GFile *file1,
539 char * g_file_get_basename (GFile *file);
540 char * g_file_get_path (GFile *file);
541 char * g_file_get_uri (GFile *file);
542 char * g_file_get_parse_name (GFile *file);
543 GFile * g_file_get_parent (GFile *file);
544 GFile * g_file_get_child (GFile *file,
546 GFile * g_file_get_child_for_display_name (GFile *file,
547 const char *display_name,
549 gboolean g_file_contains_file (GFile *parent,
551 char * g_file_get_relative_path (GFile *parent,
553 GFile * g_file_resolve_relative_path (GFile *file,
554 const char *relative_path);
555 gboolean g_file_is_native (GFile *file);
556 gboolean g_file_has_uri_scheme (GFile *file,
557 const char *uri_scheme);
558 char * g_file_get_uri_scheme (GFile *file);
559 GFileInputStream * g_file_read (GFile *file,
560 GCancellable *cancellable,
562 void g_file_read_async (GFile *file,
564 GCancellable *cancellable,
565 GAsyncReadyCallback callback,
567 GFileInputStream * g_file_read_finish (GFile *file,
570 GFileOutputStream * g_file_append_to (GFile *file,
571 GFileCreateFlags flags,
572 GCancellable *cancellable,
574 GFileOutputStream * g_file_create (GFile *file,
575 GFileCreateFlags flags,
576 GCancellable *cancellable,
578 GFileOutputStream * g_file_replace (GFile *file,
580 gboolean make_backup,
581 GFileCreateFlags flags,
582 GCancellable *cancellable,
584 void g_file_append_to_async (GFile *file,
585 GFileCreateFlags flags,
587 GCancellable *cancellable,
588 GAsyncReadyCallback callback,
590 GFileOutputStream * g_file_append_to_finish (GFile *file,
593 void g_file_create_async (GFile *file,
594 GFileCreateFlags flags,
596 GCancellable *cancellable,
597 GAsyncReadyCallback callback,
599 GFileOutputStream * g_file_create_finish (GFile *file,
602 void g_file_replace_async (GFile *file,
604 gboolean make_backup,
605 GFileCreateFlags flags,
607 GCancellable *cancellable,
608 GAsyncReadyCallback callback,
610 GFileOutputStream * g_file_replace_finish (GFile *file,
613 GFileInfo * g_file_query_info (GFile *file,
614 const char *attributes,
615 GFileQueryInfoFlags flags,
616 GCancellable *cancellable,
618 void g_file_query_info_async (GFile *file,
619 const char *attributes,
620 GFileQueryInfoFlags flags,
622 GCancellable *cancellable,
623 GAsyncReadyCallback callback,
625 GFileInfo * g_file_query_info_finish (GFile *file,
628 GFileInfo * g_file_query_filesystem_info (GFile *file,
629 const char *attributes,
630 GCancellable *cancellable,
632 GMount * g_file_find_enclosing_mount (GFile *file,
633 GCancellable *cancellable,
635 GFileEnumerator * g_file_enumerate_children (GFile *file,
636 const char *attributes,
637 GFileQueryInfoFlags flags,
638 GCancellable *cancellable,
640 void g_file_enumerate_children_async (GFile *file,
641 const char *attributes,
642 GFileQueryInfoFlags flags,
644 GCancellable *cancellable,
645 GAsyncReadyCallback callback,
647 GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
650 GFile * g_file_set_display_name (GFile *file,
651 const char *display_name,
652 GCancellable *cancellable,
654 void g_file_set_display_name_async (GFile *file,
655 const char *display_name,
657 GCancellable *cancellable,
658 GAsyncReadyCallback callback,
660 GFile * g_file_set_display_name_finish (GFile *file,
663 gboolean g_file_delete (GFile *file,
664 GCancellable *cancellable,
666 gboolean g_file_trash (GFile *file,
667 GCancellable *cancellable,
669 gboolean g_file_copy (GFile *source,
671 GFileCopyFlags flags,
672 GCancellable *cancellable,
673 GFileProgressCallback progress_callback,
674 gpointer progress_callback_data,
676 gboolean g_file_move (GFile *source,
678 GFileCopyFlags flags,
679 GCancellable *cancellable,
680 GFileProgressCallback progress_callback,
681 gpointer progress_callback_data,
683 gboolean g_file_make_directory (GFile *file,
684 GCancellable *cancellable,
686 gboolean g_file_make_symbolic_link (GFile *file,
687 const char *symlink_value,
688 GCancellable *cancellable,
690 GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
691 GCancellable *cancellable,
693 GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
694 GCancellable *cancellable,
696 gboolean g_file_set_attribute (GFile *file,
697 const char *attribute,
698 GFileAttributeType type,
700 GFileQueryInfoFlags flags,
701 GCancellable *cancellable,
703 gboolean g_file_set_attributes_from_info (GFile *file,
705 GFileQueryInfoFlags flags,
706 GCancellable *cancellable,
708 void g_file_set_attributes_async (GFile *file,
710 GFileQueryInfoFlags flags,
712 GCancellable *cancellable,
713 GAsyncReadyCallback callback,
715 gboolean g_file_set_attributes_finish (GFile *file,
716 GAsyncResult *result,
719 gboolean g_file_set_attribute_string (GFile *file,
720 const char *attribute,
722 GFileQueryInfoFlags flags,
723 GCancellable *cancellable,
725 gboolean g_file_set_attribute_byte_string (GFile *file,
726 const char *attribute,
728 GFileQueryInfoFlags flags,
729 GCancellable *cancellable,
731 gboolean g_file_set_attribute_uint32 (GFile *file,
732 const char *attribute,
734 GFileQueryInfoFlags flags,
735 GCancellable *cancellable,
737 gboolean g_file_set_attribute_int32 (GFile *file,
738 const char *attribute,
740 GFileQueryInfoFlags flags,
741 GCancellable *cancellable,
743 gboolean g_file_set_attribute_uint64 (GFile *file,
744 const char *attribute,
746 GFileQueryInfoFlags flags,
747 GCancellable *cancellable,
749 gboolean g_file_set_attribute_int64 (GFile *file,
750 const char *attribute,
752 GFileQueryInfoFlags flags,
753 GCancellable *cancellable,
755 void g_file_mount_enclosing_volume (GFile *location,
756 GMountOperation *mount_operation,
757 GCancellable *cancellable,
758 GAsyncReadyCallback callback,
760 gboolean g_file_mount_enclosing_volume_finish (GFile *location,
761 GAsyncResult *result,
763 void g_file_mount_mountable (GFile *file,
764 GMountOperation *mount_operation,
765 GCancellable *cancellable,
766 GAsyncReadyCallback callback,
768 GFile * g_file_mount_mountable_finish (GFile *file,
769 GAsyncResult *result,
771 void g_file_unmount_mountable (GFile *file,
772 GMountUnmountFlags flags,
773 GCancellable *cancellable,
774 GAsyncReadyCallback callback,
776 gboolean g_file_unmount_mountable_finish (GFile *file,
777 GAsyncResult *result,
779 void g_file_eject_mountable (GFile *file,
780 GMountUnmountFlags flags,
781 GCancellable *cancellable,
782 GAsyncReadyCallback callback,
784 gboolean g_file_eject_mountable_finish (GFile *file,
785 GAsyncResult *result,
788 gboolean g_file_copy_attributes (GFile *source,
790 GFileCopyFlags flags,
791 GCancellable *cancellable,
795 GFileMonitor* g_file_monitor_directory (GFile *file,
796 GFileMonitorFlags flags,
797 GCancellable *cancellable);
798 GFileMonitor* g_file_monitor_file (GFile *file,
799 GFileMonitorFlags flags,
800 GCancellable *cancellable);
805 gboolean g_file_load_contents (GFile *file,
806 GCancellable *cancellable,
811 void g_file_load_contents_async (GFile *file,
812 GCancellable *cancellable,
813 GAsyncReadyCallback callback,
815 gboolean g_file_load_contents_finish (GFile *file,
821 void g_file_load_partial_contents_async (GFile *file,
822 GCancellable *cancellable,
823 GFileReadMoreCallback read_more_callback,
824 GAsyncReadyCallback callback,
826 gboolean g_file_load_partial_contents_finish (GFile *file,
832 gboolean g_file_replace_contents (GFile *file,
833 const char *contents,
836 gboolean make_backup,
837 GFileCreateFlags flags,
839 GCancellable *cancellable,
841 void g_file_replace_contents_async (GFile *file,
842 const char *contents,
845 gboolean make_backup,
846 GFileCreateFlags flags,
847 GCancellable *cancellable,
848 GAsyncReadyCallback callback,
850 gboolean g_file_replace_contents_finish (GFile *file,
857 #endif /* __G_FILE_H__ */