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_NOFOLLOW_SYMLINKS: Don't follow symlinks.
48 * Flags used when querying a #GFileInfo.
51 G_FILE_QUERY_INFO_NONE = 0,
52 G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1<<0) /*< nick=nofollow-symlinks >*/
53 } GFileQueryInfoFlags;
57 * @G_FILE_CREATE_FLAGS_NONE: No flags set.
58 * @G_FILE_CREATE_FLAGS_PRIVATE: Create a file that can only be
59 * accessed by the current user.
61 * Flags used when an operation may create a file.
64 G_FILE_CREATE_NONE = 0,
65 G_FILE_CREATE_PRIVATE = (1<<0)
70 * @G_FILE_COPY_NONE: No flags set.
71 * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
72 * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
73 * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
74 * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
75 * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
77 * Flags used when copying or moving files.
80 G_FILE_COPY_NONE = 0, /*< nick=none >*/
81 G_FILE_COPY_OVERWRITE = (1<<0),
82 G_FILE_COPY_BACKUP = (1<<1),
83 G_FILE_COPY_NOFOLLOW_SYMLINKS = (1<<2),
84 G_FILE_COPY_ALL_METADATA = (1<<3),
85 G_FILE_COPY_NO_FALLBACK_FOR_MOVE = (1<<4)
90 * @G_FILE_MONITOR_NONE: No flags set.
91 * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
93 * Flags used to set what a #GFileMonitor or #GDirectoryMonitor will watch for.
96 G_FILE_MONITOR_NONE = 0,
97 G_FILE_MONITOR_WATCH_MOUNTS = (1<<0)
103 * A handle to an object implementing the #GFileIface interface.
104 * Generally stores a location within the file system. Handles do not
105 * necessarily represent files or directories that currently exist.
107 typedef struct _GFile GFile; /* Dummy typedef */
108 typedef struct _GFileIface GFileIface;
109 typedef struct _GDirectoryMonitor GDirectoryMonitor;
110 typedef struct _GFileMonitor GFileMonitor;
115 * A handle to an object implementing the #GMountIface interface.
117 typedef struct _GMount GMount; /* Dummy typedef */
120 * GFileProgressCallback:
121 * @current_num_bytes: the current number of bytes in the operation.
122 * @total_num_bytes: the total number of bytes in the operation.
123 * @user_data: user data passed to the callback.
125 * When doing file operations that may take a while, such as moving
126 * a file or copying a file, a progress callback is used to pass how
127 * far along that operation is to the application.
129 typedef void (*GFileProgressCallback) (goffset current_num_bytes,
130 goffset total_num_bytes,
134 * GFileReadMoreCallback:
135 * @file_contents: the data as currently read.
136 * @file_size: the size of the data currently read.
137 * @callback_data: data passed to the callback.
139 * When loading the partial contents of a file with g_file_read_partial_contents(),
140 * it may become necessary to determine if any more data from the file should be loaded.
141 * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
142 * should be read, or %FALSE otherwise.
144 * Returns: %TRUE if more data should be read back. %FALSE otherwise.
146 typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
148 gpointer callback_data);
152 * @g_iface: The parent interface.
153 * @dup: Duplicates a #GFile.
154 * @hash: Creates a hash of a #GFile.
155 * @equal: Checks equality of two given #GFile<!-- -->s.
156 * @is_native: Checks to see if a file is native to the system.
157 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
158 * @get_uri_scheme: Gets the URI scheme for a #GFile.
159 * @get_basename: Gets the basename for a given #GFile.
160 * @get_path: Gets the current path within a #GFile.
161 * @get_uri: Gets a URI for the path within a #GFile.
162 * @get_parse_name: Gets the parsed name for the #GFile.
163 * @get_parent: Gets the parent directory for the #GFile.
164 * @contains_file: Checks whether a #GFile contains a specified file.
165 * @get_relative_path: Gets the path for a #GFile relative to a given path.
166 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
167 * @get_child_for_display_name: Gets the child #GFile for a given display name.
168 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
169 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
170 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
171 * @query_info: Gets the #GFileInfo for a #GFile.
172 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
173 * @query_info_finish: Finishes an asynchronous query info operation.
174 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
175 * @_query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
176 * @_query_filesystem_info_finish: Finishes asynchronously getting the file system info.
177 * @find_enclosing_mount: Gets a #GMount for the #GFile.
178 * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
179 * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
180 * @set_display_name: Sets the display name for a #GFile.
181 * @set_display_name_async: Asynchronously sets a #GFile's display name.
182 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
183 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
184 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
185 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
186 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
187 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
188 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
189 * @set_attribute: Sets a #GFileAttribute.
190 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
191 * @set_attributes_async: Asynchronously sets a file's attributes.
192 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
193 * @read_fn: Reads a file asynchronously.
194 * @read_async: Asynchronously reads a file.
195 * @read_finish: Finishes asynchronously reading a file.
196 * @append_to: Writes to the end of a file.
197 * @append_to_async: Asynchronously writes to the end of a file.
198 * @append_to_finish: Finishes an asynchronous file append operation.
199 * @create: Creates a new file.
200 * @create_async: Asynchronously creates a file.
201 * @create_finish: Finishes asynchronously creating a file.
202 * @replace: Replaces the contents of a file.
203 * @replace_async: Asynchronously replaces the contents of a file.
204 * @replace_finish: Finishes asynchronously replacing a file.
205 * @delete_file: Deletes a file.
206 * @_delete_file_async: Asynchronously deletes a file.
207 * @_delete_file_finish: Finishes an asynchronous delete.
208 * @trash: Sends a #GFile to the Trash location.
209 * @_trash_async: Asynchronously sends a #GFile to the Trash location.
210 * @_trash_finish: Finishes an asynchronous file trashing operation.
211 * @make_directory: Makes a directory.
212 * @_make_directory_async: Asynchronously makes a directory.
213 * @_make_directory_finish: Finishes making a directory asynchronously.
214 * @make_symbolic_link: Makes a symbolic link.
215 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
216 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
217 * @copy: Copies a file.
218 * @_copy_async: Asynchronously copies a file.
219 * @_copy_finish: Finishes an asynchronous copy operation.
220 * @move: Moves a file.
221 * @_move_async: Asynchronously moves a file.
222 * @_move_finish: Finishes an asynchronous move operation.
223 * @mount_mountable: Mounts a mountable object.
224 * @mount_mountable_finish: Finishes a mounting operation.
225 * @unmount_mountable: Unmounts a mountable object.
226 * @unmount_mountable_finish: Finishes an unmount operation.
227 * @eject_mountable: Ejects a mountable.
228 * @eject_mountable_finish: Finishes an eject operation.
229 * @g_file_mount_enclosing_volume: Mounts a specified location.
230 * @g_file_mount_enclosing_volume_finish: Finishes mounting a specified location.
231 * @monitor_dir: Creates a #GDirectoryMonitor for the location.
232 * @monitor_file: Creates a #GFileMonitor for the location.
234 * An interface for writing VFS file handles.
238 GTypeInterface g_iface;
242 GFile * (*dup) (GFile *file);
243 guint (*hash) (GFile *file);
244 gboolean (*equal) (GFile *file1,
246 gboolean (*is_native) (GFile *file);
247 gboolean (*has_uri_scheme) (GFile *file,
248 const char *uri_scheme);
249 char * (*get_uri_scheme) (GFile *file);
250 char * (*get_basename) (GFile *file);
251 char * (*get_path) (GFile *file);
252 char * (*get_uri) (GFile *file);
253 char * (*get_parse_name) (GFile *file);
254 GFile * (*get_parent) (GFile *file);
255 gboolean (*contains_file) (GFile *parent,
257 char * (*get_relative_path) (GFile *parent,
259 GFile * (*resolve_relative_path) (GFile *file,
260 const char *relative_path);
261 GFile * (*get_child_for_display_name) (GFile *file,
262 const char *display_name,
265 GFileEnumerator * (*enumerate_children) (GFile *file,
266 const char *attributes,
267 GFileQueryInfoFlags flags,
268 GCancellable *cancellable,
270 void (*enumerate_children_async) (GFile *file,
271 const char *attributes,
272 GFileQueryInfoFlags flags,
274 GCancellable *cancellable,
275 GAsyncReadyCallback callback,
277 GFileEnumerator * (*enumerate_children_finish) (GFile *file,
281 GFileInfo * (*query_info) (GFile *file,
282 const char *attributes,
283 GFileQueryInfoFlags flags,
284 GCancellable *cancellable,
286 void (*query_info_async) (GFile *file,
287 const char *attributes,
288 GFileQueryInfoFlags flags,
290 GCancellable *cancellable,
291 GAsyncReadyCallback callback,
293 GFileInfo * (*query_info_finish) (GFile *file,
297 GFileInfo * (*query_filesystem_info)(GFile *file,
298 const char *attributes,
299 GCancellable *cancellable,
301 void (*_query_filesystem_info_async) (void);
302 void (*_query_filesystem_info_finish) (void);
304 GMount * (*find_enclosing_mount)(GFile *file,
305 GCancellable *cancellable,
307 void (*find_enclosing_mount_async)(GFile *file,
309 GCancellable *cancellable,
310 GAsyncReadyCallback callback,
312 GMount * (*find_enclosing_mount_finish)(GFile *file,
316 GFile * (*set_display_name) (GFile *file,
317 const char *display_name,
318 GCancellable *cancellable,
320 void (*set_display_name_async) (GFile *file,
321 const char *display_name,
323 GCancellable *cancellable,
324 GAsyncReadyCallback callback,
326 GFile * (*set_display_name_finish) (GFile *file,
330 GFileAttributeInfoList * (*query_settable_attributes) (GFile *file,
331 GCancellable *cancellable,
333 void (*_query_settable_attributes_async) (void);
334 void (*_query_settable_attributes_finish) (void);
336 GFileAttributeInfoList * (*query_writable_namespaces) (GFile *file,
337 GCancellable *cancellable,
339 void (*_query_writable_namespaces_async) (void);
340 void (*_query_writable_namespaces_finish) (void);
342 gboolean (*set_attribute) (GFile *file,
343 const char *attribute,
344 const GFileAttributeValue *value,
345 GFileQueryInfoFlags flags,
346 GCancellable *cancellable,
348 gboolean (*set_attributes_from_info) (GFile *file,
350 GFileQueryInfoFlags flags,
351 GCancellable *cancellable,
353 void (*set_attributes_async) (GFile *file,
355 GFileQueryInfoFlags flags,
357 GCancellable *cancellable,
358 GAsyncReadyCallback callback,
360 gboolean (*set_attributes_finish) (GFile *file,
361 GAsyncResult *result,
365 GFileInputStream * (*read_fn) (GFile *file,
366 GCancellable *cancellable,
368 void (*read_async) (GFile *file,
370 GCancellable *cancellable,
371 GAsyncReadyCallback callback,
373 GFileInputStream * (*read_finish) (GFile *file,
377 GFileOutputStream * (*append_to) (GFile *file,
378 GFileCreateFlags flags,
379 GCancellable *cancellable,
381 void (*append_to_async) (GFile *file,
382 GFileCreateFlags flags,
384 GCancellable *cancellable,
385 GAsyncReadyCallback callback,
387 GFileOutputStream * (*append_to_finish) (GFile *file,
391 GFileOutputStream * (*create) (GFile *file,
392 GFileCreateFlags flags,
393 GCancellable *cancellable,
395 void (*create_async) (GFile *file,
396 GFileCreateFlags flags,
398 GCancellable *cancellable,
399 GAsyncReadyCallback callback,
401 GFileOutputStream * (*create_finish) (GFile *file,
405 GFileOutputStream * (*replace) (GFile *file,
407 gboolean make_backup,
408 GFileCreateFlags flags,
409 GCancellable *cancellable,
411 void (*replace_async) (GFile *file,
413 gboolean make_backup,
414 GFileCreateFlags flags,
416 GCancellable *cancellable,
417 GAsyncReadyCallback callback,
419 GFileOutputStream * (*replace_finish) (GFile *file,
423 gboolean (*delete_file) (GFile *file,
424 GCancellable *cancellable,
426 void (*_delete_file_async) (void);
427 void (*_delete_file_finish) (void);
429 gboolean (*trash) (GFile *file,
430 GCancellable *cancellable,
432 void (*_trash_async) (void);
433 void (*_trash_finish) (void);
435 gboolean (*make_directory) (GFile *file,
436 GCancellable *cancellable,
438 void (*_make_directory_async) (void);
439 void (*_make_directory_finish) (void);
441 gboolean (*make_symbolic_link) (GFile *file,
442 const char *symlink_value,
443 GCancellable *cancellable,
445 void (*_make_symbolic_link_async) (void);
446 void (*_make_symbolic_link_finish) (void);
448 gboolean (*copy) (GFile *source,
450 GFileCopyFlags flags,
451 GCancellable *cancellable,
452 GFileProgressCallback progress_callback,
453 gpointer progress_callback_data,
455 void (*_copy_async) (void);
456 void (*_copy_finish) (void);
458 gboolean (*move) (GFile *source,
460 GFileCopyFlags flags,
461 GCancellable *cancellable,
462 GFileProgressCallback progress_callback,
463 gpointer progress_callback_data,
466 void (*_move_async) (void);
467 void (*_move_finish) (void);
470 void (*mount_mountable) (GFile *file,
471 GMountOperation *mount_operation,
472 GCancellable *cancellable,
473 GAsyncReadyCallback callback,
475 GFile * (*mount_mountable_finish) (GFile *file,
476 GAsyncResult *result,
478 void (*unmount_mountable) (GFile *file,
479 GCancellable *cancellable,
480 GAsyncReadyCallback callback,
482 gboolean (*unmount_mountable_finish) (GFile *file,
483 GAsyncResult *result,
485 void (*eject_mountable) (GFile *file,
486 GCancellable *cancellable,
487 GAsyncReadyCallback callback,
489 gboolean (*eject_mountable_finish) (GFile *file,
490 GAsyncResult *result,
494 void (*mount_enclosing_volume) (GFile *location,
495 GMountOperation *mount_operation,
496 GCancellable *cancellable,
497 GAsyncReadyCallback callback,
499 gboolean (*mount_enclosing_volume_finish) (GFile *location,
500 GAsyncResult *result,
503 GDirectoryMonitor* (*monitor_dir) (GFile *file,
504 GFileMonitorFlags flags,
505 GCancellable *cancellable);
507 GFileMonitor* (*monitor_file) (GFile *file,
508 GFileMonitorFlags flags,
509 GCancellable *cancellable);
513 GType g_file_get_type (void) G_GNUC_CONST;
515 GFile * g_file_new_for_path (const char *path);
516 GFile * g_file_new_for_uri (const char *uri);
517 GFile * g_file_new_for_commandline_arg (const char *arg);
518 GFile * g_file_parse_name (const char *parse_name);
519 GFile * g_file_dup (GFile *file);
520 guint g_file_hash (gconstpointer file);
521 gboolean g_file_equal (GFile *file1,
523 char * g_file_get_basename (GFile *file);
524 char * g_file_get_path (GFile *file);
525 char * g_file_get_uri (GFile *file);
526 char * g_file_get_parse_name (GFile *file);
527 GFile * g_file_get_parent (GFile *file);
528 GFile * g_file_get_child (GFile *file,
530 GFile * g_file_get_child_for_display_name (GFile *file,
531 const char *display_name,
533 gboolean g_file_contains_file (GFile *parent,
535 char * g_file_get_relative_path (GFile *parent,
537 GFile * g_file_resolve_relative_path (GFile *file,
538 const char *relative_path);
539 gboolean g_file_is_native (GFile *file);
540 gboolean g_file_has_uri_scheme (GFile *file,
541 const char *uri_scheme);
542 char * g_file_get_uri_scheme (GFile *file);
543 GFileInputStream * g_file_read (GFile *file,
544 GCancellable *cancellable,
546 void g_file_read_async (GFile *file,
548 GCancellable *cancellable,
549 GAsyncReadyCallback callback,
551 GFileInputStream * g_file_read_finish (GFile *file,
554 GFileOutputStream * g_file_append_to (GFile *file,
555 GFileCreateFlags flags,
556 GCancellable *cancellable,
558 GFileOutputStream * g_file_create (GFile *file,
559 GFileCreateFlags flags,
560 GCancellable *cancellable,
562 GFileOutputStream * g_file_replace (GFile *file,
564 gboolean make_backup,
565 GFileCreateFlags flags,
566 GCancellable *cancellable,
568 void g_file_append_to_async (GFile *file,
569 GFileCreateFlags flags,
571 GCancellable *cancellable,
572 GAsyncReadyCallback callback,
574 GFileOutputStream * g_file_append_to_finish (GFile *file,
577 void g_file_create_async (GFile *file,
578 GFileCreateFlags flags,
580 GCancellable *cancellable,
581 GAsyncReadyCallback callback,
583 GFileOutputStream * g_file_create_finish (GFile *file,
586 void g_file_replace_async (GFile *file,
588 gboolean make_backup,
589 GFileCreateFlags flags,
591 GCancellable *cancellable,
592 GAsyncReadyCallback callback,
594 GFileOutputStream * g_file_replace_finish (GFile *file,
597 GFileInfo * g_file_query_info (GFile *file,
598 const char *attributes,
599 GFileQueryInfoFlags flags,
600 GCancellable *cancellable,
602 void g_file_query_info_async (GFile *file,
603 const char *attributes,
604 GFileQueryInfoFlags flags,
606 GCancellable *cancellable,
607 GAsyncReadyCallback callback,
609 GFileInfo * g_file_query_info_finish (GFile *file,
612 GFileInfo * g_file_query_filesystem_info (GFile *file,
613 const char *attributes,
614 GCancellable *cancellable,
616 GMount * g_file_find_enclosing_mount (GFile *file,
617 GCancellable *cancellable,
619 GFileEnumerator * g_file_enumerate_children (GFile *file,
620 const char *attributes,
621 GFileQueryInfoFlags flags,
622 GCancellable *cancellable,
624 void g_file_enumerate_children_async (GFile *file,
625 const char *attributes,
626 GFileQueryInfoFlags flags,
628 GCancellable *cancellable,
629 GAsyncReadyCallback callback,
631 GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
634 GFile * g_file_set_display_name (GFile *file,
635 const char *display_name,
636 GCancellable *cancellable,
638 void g_file_set_display_name_async (GFile *file,
639 const char *display_name,
641 GCancellable *cancellable,
642 GAsyncReadyCallback callback,
644 GFile * g_file_set_display_name_finish (GFile *file,
647 gboolean g_file_delete (GFile *file,
648 GCancellable *cancellable,
650 gboolean g_file_trash (GFile *file,
651 GCancellable *cancellable,
653 gboolean g_file_copy (GFile *source,
655 GFileCopyFlags flags,
656 GCancellable *cancellable,
657 GFileProgressCallback progress_callback,
658 gpointer progress_callback_data,
660 gboolean g_file_move (GFile *source,
662 GFileCopyFlags flags,
663 GCancellable *cancellable,
664 GFileProgressCallback progress_callback,
665 gpointer progress_callback_data,
667 gboolean g_file_make_directory (GFile *file,
668 GCancellable *cancellable,
670 gboolean g_file_make_symbolic_link (GFile *file,
671 const char *symlink_value,
672 GCancellable *cancellable,
674 GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
675 GCancellable *cancellable,
677 GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
678 GCancellable *cancellable,
680 gboolean g_file_set_attribute (GFile *file,
681 const char *attribute,
682 const GFileAttributeValue *value,
683 GFileQueryInfoFlags flags,
684 GCancellable *cancellable,
686 gboolean g_file_set_attributes_from_info (GFile *file,
688 GFileQueryInfoFlags flags,
689 GCancellable *cancellable,
691 void g_file_set_attributes_async (GFile *file,
693 GFileQueryInfoFlags flags,
695 GCancellable *cancellable,
696 GAsyncReadyCallback callback,
698 gboolean g_file_set_attributes_finish (GFile *file,
699 GAsyncResult *result,
702 gboolean g_file_set_attribute_string (GFile *file,
703 const char *attribute,
705 GFileQueryInfoFlags flags,
706 GCancellable *cancellable,
708 gboolean g_file_set_attribute_byte_string (GFile *file,
709 const char *attribute,
711 GFileQueryInfoFlags flags,
712 GCancellable *cancellable,
714 gboolean g_file_set_attribute_uint32 (GFile *file,
715 const char *attribute,
717 GFileQueryInfoFlags flags,
718 GCancellable *cancellable,
720 gboolean g_file_set_attribute_int32 (GFile *file,
721 const char *attribute,
723 GFileQueryInfoFlags flags,
724 GCancellable *cancellable,
726 gboolean g_file_set_attribute_uint64 (GFile *file,
727 const char *attribute,
729 GFileQueryInfoFlags flags,
730 GCancellable *cancellable,
732 gboolean g_file_set_attribute_int64 (GFile *file,
733 const char *attribute,
735 GFileQueryInfoFlags flags,
736 GCancellable *cancellable,
738 void g_file_mount_enclosing_volume (GFile *location,
739 GMountOperation *mount_operation,
740 GCancellable *cancellable,
741 GAsyncReadyCallback callback,
743 gboolean g_file_mount_enclosing_volume_finish (GFile *location,
744 GAsyncResult *result,
746 void g_file_mount_mountable (GFile *file,
747 GMountOperation *mount_operation,
748 GCancellable *cancellable,
749 GAsyncReadyCallback callback,
751 GFile * g_file_mount_mountable_finish (GFile *file,
752 GAsyncResult *result,
754 void g_file_unmount_mountable (GFile *file,
755 GCancellable *cancellable,
756 GAsyncReadyCallback callback,
758 gboolean g_file_unmount_mountable_finish (GFile *file,
759 GAsyncResult *result,
761 void g_file_eject_mountable (GFile *file,
762 GCancellable *cancellable,
763 GAsyncReadyCallback callback,
765 gboolean g_file_eject_mountable_finish (GFile *file,
766 GAsyncResult *result,
769 gboolean g_file_copy_attributes (GFile *source,
771 GFileCopyFlags flags,
772 GCancellable *cancellable,
776 GDirectoryMonitor* g_file_monitor_directory (GFile *file,
777 GFileMonitorFlags flags,
778 GCancellable *cancellable);
779 GFileMonitor* g_file_monitor_file (GFile *file,
780 GFileMonitorFlags flags,
781 GCancellable *cancellable);
786 gboolean g_file_load_contents (GFile *file,
787 GCancellable *cancellable,
792 void g_file_load_contents_async (GFile *file,
793 GCancellable *cancellable,
794 GAsyncReadyCallback callback,
796 gboolean g_file_load_contents_finish (GFile *file,
802 void g_file_load_partial_contents_async (GFile *file,
803 GCancellable *cancellable,
804 GFileReadMoreCallback read_more_callback,
805 GAsyncReadyCallback callback,
807 gboolean g_file_load_partial_contents_finish (GFile *file,
813 gboolean g_file_replace_contents (GFile *file,
814 const char *contents,
817 gboolean make_backup,
818 GFileCreateFlags flags,
820 GCancellable *cancellable,
822 void g_file_replace_contents_async (GFile *file,
823 const char *contents,
826 gboolean make_backup,
827 GFileCreateFlags flags,
828 GCancellable *cancellable,
829 GAsyncReadyCallback callback,
831 gboolean g_file_replace_contents_finish (GFile *file,
838 #endif /* __G_FILE_H__ */