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 or #GDirectoryMonitor 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 _GDirectoryMonitor GDirectoryMonitor;
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 #GDirectoryMonitor 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) (void);
471 void (*_copy_finish) (void);
473 gboolean (*move) (GFile *source,
475 GFileCopyFlags flags,
476 GCancellable *cancellable,
477 GFileProgressCallback progress_callback,
478 gpointer progress_callback_data,
481 void (*_move_async) (void);
482 void (*_move_finish) (void);
485 void (*mount_mountable) (GFile *file,
486 GMountOperation *mount_operation,
487 GCancellable *cancellable,
488 GAsyncReadyCallback callback,
490 GFile * (*mount_mountable_finish) (GFile *file,
491 GAsyncResult *result,
493 void (*unmount_mountable) (GFile *file,
494 GMountUnmountFlags flags,
495 GCancellable *cancellable,
496 GAsyncReadyCallback callback,
498 gboolean (*unmount_mountable_finish) (GFile *file,
499 GAsyncResult *result,
501 void (*eject_mountable) (GFile *file,
502 GMountUnmountFlags flags,
503 GCancellable *cancellable,
504 GAsyncReadyCallback callback,
506 gboolean (*eject_mountable_finish) (GFile *file,
507 GAsyncResult *result,
511 void (*mount_enclosing_volume) (GFile *location,
512 GMountOperation *mount_operation,
513 GCancellable *cancellable,
514 GAsyncReadyCallback callback,
516 gboolean (*mount_enclosing_volume_finish) (GFile *location,
517 GAsyncResult *result,
520 GDirectoryMonitor* (*monitor_dir) (GFile *file,
521 GFileMonitorFlags flags,
522 GCancellable *cancellable);
524 GFileMonitor* (*monitor_file) (GFile *file,
525 GFileMonitorFlags flags,
526 GCancellable *cancellable);
530 GType g_file_get_type (void) G_GNUC_CONST;
532 GFile * g_file_new_for_path (const char *path);
533 GFile * g_file_new_for_uri (const char *uri);
534 GFile * g_file_new_for_commandline_arg (const char *arg);
535 GFile * g_file_parse_name (const char *parse_name);
536 GFile * g_file_dup (GFile *file);
537 guint g_file_hash (gconstpointer file);
538 gboolean g_file_equal (GFile *file1,
540 char * g_file_get_basename (GFile *file);
541 char * g_file_get_path (GFile *file);
542 char * g_file_get_uri (GFile *file);
543 char * g_file_get_parse_name (GFile *file);
544 GFile * g_file_get_parent (GFile *file);
545 GFile * g_file_get_child (GFile *file,
547 GFile * g_file_get_child_for_display_name (GFile *file,
548 const char *display_name,
550 gboolean g_file_contains_file (GFile *parent,
552 char * g_file_get_relative_path (GFile *parent,
554 GFile * g_file_resolve_relative_path (GFile *file,
555 const char *relative_path);
556 gboolean g_file_is_native (GFile *file);
557 gboolean g_file_has_uri_scheme (GFile *file,
558 const char *uri_scheme);
559 char * g_file_get_uri_scheme (GFile *file);
560 GFileInputStream * g_file_read (GFile *file,
561 GCancellable *cancellable,
563 void g_file_read_async (GFile *file,
565 GCancellable *cancellable,
566 GAsyncReadyCallback callback,
568 GFileInputStream * g_file_read_finish (GFile *file,
571 GFileOutputStream * g_file_append_to (GFile *file,
572 GFileCreateFlags flags,
573 GCancellable *cancellable,
575 GFileOutputStream * g_file_create (GFile *file,
576 GFileCreateFlags flags,
577 GCancellable *cancellable,
579 GFileOutputStream * g_file_replace (GFile *file,
581 gboolean make_backup,
582 GFileCreateFlags flags,
583 GCancellable *cancellable,
585 void g_file_append_to_async (GFile *file,
586 GFileCreateFlags flags,
588 GCancellable *cancellable,
589 GAsyncReadyCallback callback,
591 GFileOutputStream * g_file_append_to_finish (GFile *file,
594 void g_file_create_async (GFile *file,
595 GFileCreateFlags flags,
597 GCancellable *cancellable,
598 GAsyncReadyCallback callback,
600 GFileOutputStream * g_file_create_finish (GFile *file,
603 void g_file_replace_async (GFile *file,
605 gboolean make_backup,
606 GFileCreateFlags flags,
608 GCancellable *cancellable,
609 GAsyncReadyCallback callback,
611 GFileOutputStream * g_file_replace_finish (GFile *file,
614 GFileInfo * g_file_query_info (GFile *file,
615 const char *attributes,
616 GFileQueryInfoFlags flags,
617 GCancellable *cancellable,
619 void g_file_query_info_async (GFile *file,
620 const char *attributes,
621 GFileQueryInfoFlags flags,
623 GCancellable *cancellable,
624 GAsyncReadyCallback callback,
626 GFileInfo * g_file_query_info_finish (GFile *file,
629 GFileInfo * g_file_query_filesystem_info (GFile *file,
630 const char *attributes,
631 GCancellable *cancellable,
633 GMount * g_file_find_enclosing_mount (GFile *file,
634 GCancellable *cancellable,
636 GFileEnumerator * g_file_enumerate_children (GFile *file,
637 const char *attributes,
638 GFileQueryInfoFlags flags,
639 GCancellable *cancellable,
641 void g_file_enumerate_children_async (GFile *file,
642 const char *attributes,
643 GFileQueryInfoFlags flags,
645 GCancellable *cancellable,
646 GAsyncReadyCallback callback,
648 GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
651 GFile * g_file_set_display_name (GFile *file,
652 const char *display_name,
653 GCancellable *cancellable,
655 void g_file_set_display_name_async (GFile *file,
656 const char *display_name,
658 GCancellable *cancellable,
659 GAsyncReadyCallback callback,
661 GFile * g_file_set_display_name_finish (GFile *file,
664 gboolean g_file_delete (GFile *file,
665 GCancellable *cancellable,
667 gboolean g_file_trash (GFile *file,
668 GCancellable *cancellable,
670 gboolean g_file_copy (GFile *source,
672 GFileCopyFlags flags,
673 GCancellable *cancellable,
674 GFileProgressCallback progress_callback,
675 gpointer progress_callback_data,
677 gboolean g_file_move (GFile *source,
679 GFileCopyFlags flags,
680 GCancellable *cancellable,
681 GFileProgressCallback progress_callback,
682 gpointer progress_callback_data,
684 gboolean g_file_make_directory (GFile *file,
685 GCancellable *cancellable,
687 gboolean g_file_make_symbolic_link (GFile *file,
688 const char *symlink_value,
689 GCancellable *cancellable,
691 GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
692 GCancellable *cancellable,
694 GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
695 GCancellable *cancellable,
697 gboolean g_file_set_attribute (GFile *file,
698 const char *attribute,
699 GFileAttributeType type,
701 GFileQueryInfoFlags flags,
702 GCancellable *cancellable,
704 gboolean g_file_set_attributes_from_info (GFile *file,
706 GFileQueryInfoFlags flags,
707 GCancellable *cancellable,
709 void g_file_set_attributes_async (GFile *file,
711 GFileQueryInfoFlags flags,
713 GCancellable *cancellable,
714 GAsyncReadyCallback callback,
716 gboolean g_file_set_attributes_finish (GFile *file,
717 GAsyncResult *result,
720 gboolean g_file_set_attribute_string (GFile *file,
721 const char *attribute,
723 GFileQueryInfoFlags flags,
724 GCancellable *cancellable,
726 gboolean g_file_set_attribute_byte_string (GFile *file,
727 const char *attribute,
729 GFileQueryInfoFlags flags,
730 GCancellable *cancellable,
732 gboolean g_file_set_attribute_uint32 (GFile *file,
733 const char *attribute,
735 GFileQueryInfoFlags flags,
736 GCancellable *cancellable,
738 gboolean g_file_set_attribute_int32 (GFile *file,
739 const char *attribute,
741 GFileQueryInfoFlags flags,
742 GCancellable *cancellable,
744 gboolean g_file_set_attribute_uint64 (GFile *file,
745 const char *attribute,
747 GFileQueryInfoFlags flags,
748 GCancellable *cancellable,
750 gboolean g_file_set_attribute_int64 (GFile *file,
751 const char *attribute,
753 GFileQueryInfoFlags flags,
754 GCancellable *cancellable,
756 void g_file_mount_enclosing_volume (GFile *location,
757 GMountOperation *mount_operation,
758 GCancellable *cancellable,
759 GAsyncReadyCallback callback,
761 gboolean g_file_mount_enclosing_volume_finish (GFile *location,
762 GAsyncResult *result,
764 void g_file_mount_mountable (GFile *file,
765 GMountOperation *mount_operation,
766 GCancellable *cancellable,
767 GAsyncReadyCallback callback,
769 GFile * g_file_mount_mountable_finish (GFile *file,
770 GAsyncResult *result,
772 void g_file_unmount_mountable (GFile *file,
773 GMountUnmountFlags flags,
774 GCancellable *cancellable,
775 GAsyncReadyCallback callback,
777 gboolean g_file_unmount_mountable_finish (GFile *file,
778 GAsyncResult *result,
780 void g_file_eject_mountable (GFile *file,
781 GMountUnmountFlags flags,
782 GCancellable *cancellable,
783 GAsyncReadyCallback callback,
785 gboolean g_file_eject_mountable_finish (GFile *file,
786 GAsyncResult *result,
789 gboolean g_file_copy_attributes (GFile *source,
791 GFileCopyFlags flags,
792 GCancellable *cancellable,
796 GDirectoryMonitor* g_file_monitor_directory (GFile *file,
797 GFileMonitorFlags flags,
798 GCancellable *cancellable);
799 GFileMonitor* g_file_monitor_file (GFile *file,
800 GFileMonitorFlags flags,
801 GCancellable *cancellable);
806 gboolean g_file_load_contents (GFile *file,
807 GCancellable *cancellable,
812 void g_file_load_contents_async (GFile *file,
813 GCancellable *cancellable,
814 GAsyncReadyCallback callback,
816 gboolean g_file_load_contents_finish (GFile *file,
822 void g_file_load_partial_contents_async (GFile *file,
823 GCancellable *cancellable,
824 GFileReadMoreCallback read_more_callback,
825 GAsyncReadyCallback callback,
827 gboolean g_file_load_partial_contents_finish (GFile *file,
833 gboolean g_file_replace_contents (GFile *file,
834 const char *contents,
837 gboolean make_backup,
838 GFileCreateFlags flags,
840 GCancellable *cancellable,
842 void g_file_replace_contents_async (GFile *file,
843 const char *contents,
846 gboolean make_backup,
847 GFileCreateFlags flags,
848 GCancellable *cancellable,
849 GAsyncReadyCallback callback,
851 gboolean g_file_replace_contents_finish (GFile *file,
858 #endif /* __G_FILE_H__ */