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>
26 #include <glib-object.h>
27 #include <gio/gfileinfo.h>
28 #include <gio/gfileenumerator.h>
29 #include <gio/gfileinputstream.h>
30 #include <gio/gfileoutputstream.h>
31 #include <gio/gmountoperation.h>
35 #define G_TYPE_FILE (g_file_get_type ())
36 #define G_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE, GFile))
37 #define G_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE))
38 #define G_FILE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE, GFileIface))
41 * GFileQueryInfoFlags:
42 * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
44 * Flags used when querying a #GFileInfo.
47 G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1<<0) /*< nick=nofollow-symlinks >*/
48 } GFileQueryInfoFlags;
52 * @G_FILE_CREATE_FLAGS_NONE: No flags set.
53 * @G_FILE_CREATE_FLAGS_PRIVATE: Create a file that can only be
54 * accessed by the current user.
56 * Flags used when an operation may create a file.
59 G_FILE_CREATE_FLAGS_NONE = 0,
60 G_FILE_CREATE_FLAGS_PRIVATE = (1<<0)
65 * @G_FILE_COPY_FLAGS_NONE: No flags set.
66 * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
67 * @G_FILE_COPY_BACKUP: Make a backup of any existing files. TODO: explain backup naming scheme.
68 * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
69 * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set (see #GFileInfo).
70 * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
72 * Flags used when copying or moving files.
75 G_FILE_COPY_FLAGS_NONE = 0, /*< nick=none >*/
76 G_FILE_COPY_OVERWRITE = (1<<0),
77 G_FILE_COPY_BACKUP = (1<<1),
78 G_FILE_COPY_NOFOLLOW_SYMLINKS = (1<<2),
79 G_FILE_COPY_ALL_METADATA = (1<<3),
80 G_FILE_COPY_NO_FALLBACK_FOR_MOVE = (1<<4)
85 * @G_FILE_MONITOR_FLAGS_NONE: No flags set.
86 * @G_FILE_MONITOR_FLAGS_MONITOR_MOUNTS: Watch for mount events.
88 * Flags used to set what a #GFileMonitor or #GDirectoryMonitor will watch for.
91 G_FILE_MONITOR_FLAGS_NONE = 0,
92 G_FILE_MONITOR_FLAGS_MONITOR_MOUNTS = (1<<0)
98 * A handle to an object implementing the #GFileIface interface.
99 * Generally stores a location within the file system. Handles do not
100 * necessarily represent files or directories that currently exist.
102 typedef struct _GFile GFile; /* Dummy typedef */
103 typedef struct _GFileIface GFileIface;
104 typedef struct _GDirectoryMonitor GDirectoryMonitor;
105 typedef struct _GFileMonitor GFileMonitor;
110 * A handle to an object implementing the #GVolumeIface interface.
112 typedef struct _GVolume GVolume; /* Dummy typedef */
115 * GFileProgressCallback:
116 * @current_num_bytes: the current number of bytes in the operation.
117 * @total_num_bytes: the total number of bytes in the operation.
118 * @user_data: user data passed to the callback.
120 * When doing file operations that may take a while, such as moving
121 * a file or copying a file, a progress callback is used to pass how
122 * far along that operation is to the application.
124 typedef void (*GFileProgressCallback) (goffset current_num_bytes,
125 goffset total_num_bytes,
129 * GFileReadMoreCallback:
130 * @file_contents: the data as currently read.
131 * @file_size: the size of the data currently read.
132 * @callback_data: data passed to the callback.
134 * When loading the partial contents of a file with g_file_read_partial_contents(),
135 * it may become necessary to determine if any more data from the file should be loaded.
136 * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
137 * should be read, or %FALSE otherwise.
139 * Returns: %TRUE if more data should be read back. %FALSE otherwise.
141 typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
143 gpointer callback_data);
147 * @g_iface: The parent interface.
148 * @dup: Duplicates a #GFile.
149 * @hash: Creates a hash of a #GFile.
150 * @equal: Checks equality of two given #GFile<!-- -->s.
151 * @is_native: Checks to see if a file is native to the system.
152 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
153 * @get_uri_scheme: Gets the URI scheme for a #GFile.
154 * @get_basename: Gets the basename for a given #GFile.
155 * @get_path: Gets the current path within a #GFile.
156 * @get_uri: Gets a URI for the path within a #GFile.
157 * @get_parse_name: Gets the parsed name for the #GFile.
158 * @get_parent: Gets the parent directory for the #GFile.
159 * @contains_file: Checks whether a #GFile contains a specified file.
160 * @get_relative_path: Gets the path for a #GFile relative to a given path.
161 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
162 * @get_child_for_display_name: Gets the child #GFile for a given display name.
163 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
164 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
165 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
166 * @query_info: Gets the #GFileInfo for a #GFile.
167 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
168 * @query_info_finish: Finishes an asynchronous query info operation.
169 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
170 * @_query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
171 * @_query_filesystem_info_finish: Finishes asynchronously getting the file system info.
172 * @find_enclosing_volume: Gets a #GVolume for the #GFile.
173 * @find_enclosing_volume_async: Asynchronously gets the #GVolume for a #GFile.
174 * @find_enclosing_volume_finish: Finishes asynchronously getting the volume.
175 * @set_display_name: Sets the display name for a #GFile.
176 * @set_display_name_async: Asynchronously sets a #GFile's display name.
177 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
178 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
179 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
180 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
181 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
182 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
183 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
184 * @set_attribute: Sets a #GFileAttribute.
185 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
186 * @set_attributes_async: Asynchronously sets a file's attributes.
187 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
188 * @read_fn: Reads a file asynchronously.
189 * @read_async: Asynchronously reads a file.
190 * @read_finish: Finishes asynchronously reading a file.
191 * @append_to: Writes to the end of a file.
192 * @append_to_async: Asynchronously writes to the end of a file.
193 * @append_to_finish: Finishes an asynchronous file append operation.
194 * @create: Creates a new file.
195 * @create_async: Asynchronously creates a file.
196 * @create_finish: Finishes asynchronously creating a file.
197 * @replace: Replaces the contents of a file.
198 * @replace_async: Asynchronously replaces the contents of a file.
199 * @replace_finish: Finishes asynchronously replacing a file.
200 * @delete_file: Deletes a file.
201 * @_delete_file_async: Asynchronously deletes a file.
202 * @_delete_file_finish: Finishes an asynchronous delete.
203 * @trash: Sends a #GFile to the Trash location.
204 * @_trash_async: Asynchronously sends a #GFile to the Trash location.
205 * @_trash_finish: Finishes an asynchronous file trashing operation.
206 * @make_directory: Makes a directory.
207 * @_make_directory_async: Asynchronously makes a directory.
208 * @_make_directory_finish: Finishes making a directory asynchronously.
209 * @make_symbolic_link: Makes a symbolic link.
210 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
211 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
212 * @copy: Copies a file.
213 * @_copy_async: Asynchronously copies a file.
214 * @_copy_finish: Finishes an asynchronous copy operation.
215 * @move: Moves a file.
216 * @_move_async: Asynchronously moves a file.
217 * @_move_finish: Finishes an asynchronous move operation.
218 * @mount_mountable: Mounts a mountable object.
219 * @mount_mountable_finish: Finishes a mounting operation.
220 * @unmount_mountable: Unmounts a mountable object.
221 * @unmount_mountable_finish: Finishes an unmount operation.
222 * @eject_mountable: Ejects a mountable.
223 * @eject_mountable_finish: Finishes an eject operation.
224 * @mount_for_location: Mounts a specified location.
225 * @mount_for_location_finish: Finishes mounting a specified location.
226 * @monitor_dir: Creates a #GDirectoryMonitor for the location.
227 * @monitor_file: Creates a #GFileMonitor for the location.
229 * An interface for writing VFS file handles.
233 GTypeInterface g_iface;
237 GFile * (*dup) (GFile *file);
238 guint (*hash) (GFile *file);
239 gboolean (*equal) (GFile *file1,
241 gboolean (*is_native) (GFile *file);
242 gboolean (*has_uri_scheme) (GFile *file,
243 const char *uri_scheme);
244 char * (*get_uri_scheme) (GFile *file);
245 char * (*get_basename) (GFile *file);
246 char * (*get_path) (GFile *file);
247 char * (*get_uri) (GFile *file);
248 char * (*get_parse_name) (GFile *file);
249 GFile * (*get_parent) (GFile *file);
250 gboolean (*contains_file) (GFile *parent,
252 char * (*get_relative_path) (GFile *parent,
254 GFile * (*resolve_relative_path) (GFile *file,
255 const char *relative_path);
256 GFile * (*get_child_for_display_name) (GFile *file,
257 const char *display_name,
260 GFileEnumerator * (*enumerate_children) (GFile *file,
261 const char *attributes,
262 GFileQueryInfoFlags flags,
263 GCancellable *cancellable,
265 void (*enumerate_children_async) (GFile *file,
266 const char *attributes,
267 GFileQueryInfoFlags flags,
269 GCancellable *cancellable,
270 GAsyncReadyCallback callback,
272 GFileEnumerator * (*enumerate_children_finish) (GFile *file,
276 GFileInfo * (*query_info) (GFile *file,
277 const char *attributes,
278 GFileQueryInfoFlags flags,
279 GCancellable *cancellable,
281 void (*query_info_async) (GFile *file,
282 const char *attributes,
283 GFileQueryInfoFlags flags,
285 GCancellable *cancellable,
286 GAsyncReadyCallback callback,
288 GFileInfo * (*query_info_finish) (GFile *file,
292 GFileInfo * (*query_filesystem_info)(GFile *file,
293 const char *attributes,
294 GCancellable *cancellable,
296 void (*_query_filesystem_info_async) (void);
297 void (*_query_filesystem_info_finish) (void);
299 GVolume * (*find_enclosing_volume)(GFile *file,
300 GCancellable *cancellable,
302 void (*find_enclosing_volume_async)(GFile *file,
304 GCancellable *cancellable,
305 GAsyncReadyCallback callback,
307 GVolume * (*find_enclosing_volume_finish)(GFile *file,
311 GFile * (*set_display_name) (GFile *file,
312 const char *display_name,
313 GCancellable *cancellable,
315 void (*set_display_name_async) (GFile *file,
316 const char *display_name,
318 GCancellable *cancellable,
319 GAsyncReadyCallback callback,
321 GFile * (*set_display_name_finish) (GFile *file,
325 GFileAttributeInfoList * (*query_settable_attributes) (GFile *file,
326 GCancellable *cancellable,
328 void (*_query_settable_attributes_async) (void);
329 void (*_query_settable_attributes_finish) (void);
331 GFileAttributeInfoList * (*query_writable_namespaces) (GFile *file,
332 GCancellable *cancellable,
334 void (*_query_writable_namespaces_async) (void);
335 void (*_query_writable_namespaces_finish) (void);
337 gboolean (*set_attribute) (GFile *file,
338 const char *attribute,
339 const GFileAttributeValue *value,
340 GFileQueryInfoFlags flags,
341 GCancellable *cancellable,
343 gboolean (*set_attributes_from_info) (GFile *file,
345 GFileQueryInfoFlags flags,
346 GCancellable *cancellable,
348 void (*set_attributes_async) (GFile *file,
350 GFileQueryInfoFlags flags,
352 GCancellable *cancellable,
353 GAsyncReadyCallback callback,
355 gboolean (*set_attributes_finish) (GFile *file,
356 GAsyncResult *result,
360 GFileInputStream * (*read_fn) (GFile *file,
361 GCancellable *cancellable,
363 void (*read_async) (GFile *file,
365 GCancellable *cancellable,
366 GAsyncReadyCallback callback,
368 GFileInputStream * (*read_finish) (GFile *file,
372 GFileOutputStream * (*append_to) (GFile *file,
373 GFileCreateFlags flags,
374 GCancellable *cancellable,
376 void (*append_to_async) (GFile *file,
377 GFileCreateFlags flags,
379 GCancellable *cancellable,
380 GAsyncReadyCallback callback,
382 GFileOutputStream * (*append_to_finish) (GFile *file,
386 GFileOutputStream * (*create) (GFile *file,
387 GFileCreateFlags flags,
388 GCancellable *cancellable,
390 void (*create_async) (GFile *file,
391 GFileCreateFlags flags,
393 GCancellable *cancellable,
394 GAsyncReadyCallback callback,
396 GFileOutputStream * (*create_finish) (GFile *file,
400 GFileOutputStream * (*replace) (GFile *file,
402 gboolean make_backup,
403 GFileCreateFlags flags,
404 GCancellable *cancellable,
406 void (*replace_async) (GFile *file,
408 gboolean make_backup,
409 GFileCreateFlags flags,
411 GCancellable *cancellable,
412 GAsyncReadyCallback callback,
414 GFileOutputStream * (*replace_finish) (GFile *file,
418 gboolean (*delete_file) (GFile *file,
419 GCancellable *cancellable,
421 void (*_delete_file_async) (void);
422 void (*_delete_file_finish) (void);
424 gboolean (*trash) (GFile *file,
425 GCancellable *cancellable,
427 void (*_trash_async) (void);
428 void (*_trash_finish) (void);
430 gboolean (*make_directory) (GFile *file,
431 GCancellable *cancellable,
433 void (*_make_directory_async) (void);
434 void (*_make_directory_finish) (void);
436 gboolean (*make_symbolic_link) (GFile *file,
437 const char *symlink_value,
438 GCancellable *cancellable,
440 void (*_make_symbolic_link_async) (void);
441 void (*_make_symbolic_link_finish) (void);
443 gboolean (*copy) (GFile *source,
445 GFileCopyFlags flags,
446 GCancellable *cancellable,
447 GFileProgressCallback progress_callback,
448 gpointer progress_callback_data,
450 void (*_copy_async) (void);
451 void (*_copy_finish) (void);
453 gboolean (*move) (GFile *source,
455 GFileCopyFlags flags,
456 GCancellable *cancellable,
457 GFileProgressCallback progress_callback,
458 gpointer progress_callback_data,
461 void (*_move_async) (void);
462 void (*_move_finish) (void);
465 void (*mount_mountable) (GFile *file,
466 GMountOperation *mount_operation,
467 GCancellable *cancellable,
468 GAsyncReadyCallback callback,
470 GFile * (*mount_mountable_finish) (GFile *file,
471 GAsyncResult *result,
473 void (*unmount_mountable) (GFile *file,
474 GCancellable *cancellable,
475 GAsyncReadyCallback callback,
477 gboolean (*unmount_mountable_finish) (GFile *file,
478 GAsyncResult *result,
480 void (*eject_mountable) (GFile *file,
481 GCancellable *cancellable,
482 GAsyncReadyCallback callback,
484 gboolean (*eject_mountable_finish) (GFile *file,
485 GAsyncResult *result,
489 void (*mount_for_location) (GFile *location,
490 GMountOperation *mount_operation,
491 GCancellable *cancellable,
492 GAsyncReadyCallback callback,
494 gboolean (*mount_for_location_finish) (GFile *location,
495 GAsyncResult *result,
498 GDirectoryMonitor* (*monitor_dir) (GFile *file,
499 GFileMonitorFlags flags,
500 GCancellable *cancellable);
502 GFileMonitor* (*monitor_file) (GFile *file,
503 GFileMonitorFlags flags,
504 GCancellable *cancellable);
508 GType g_file_get_type (void) G_GNUC_CONST;
510 GFile * g_file_new_for_path (const char *path);
511 GFile * g_file_new_for_uri (const char *uri);
512 GFile * g_file_new_for_commandline_arg (const char *arg);
513 GFile * g_file_parse_name (const char *parse_name);
514 GFile * g_file_dup (GFile *file);
515 guint g_file_hash (gconstpointer file);
516 gboolean g_file_equal (GFile *file1,
518 char * g_file_get_basename (GFile *file);
519 char * g_file_get_path (GFile *file);
520 char * g_file_get_uri (GFile *file);
521 char * g_file_get_parse_name (GFile *file);
522 GFile * g_file_get_parent (GFile *file);
523 GFile * g_file_get_child (GFile *file,
525 GFile * g_file_get_child_for_display_name (GFile *file,
526 const char *display_name,
528 gboolean g_file_contains_file (GFile *parent,
530 char * g_file_get_relative_path (GFile *parent,
532 GFile * g_file_resolve_relative_path (GFile *file,
533 const char *relative_path);
534 gboolean g_file_is_native (GFile *file);
535 gboolean g_file_has_uri_scheme (GFile *file,
536 const char *uri_scheme);
537 char * g_file_get_uri_scheme (GFile *file);
538 GFileInputStream * g_file_read (GFile *file,
539 GCancellable *cancellable,
541 void g_file_read_async (GFile *file,
543 GCancellable *cancellable,
544 GAsyncReadyCallback callback,
546 GFileInputStream * g_file_read_finish (GFile *file,
549 GFileOutputStream * g_file_append_to (GFile *file,
550 GFileCreateFlags flags,
551 GCancellable *cancellable,
553 GFileOutputStream * g_file_create (GFile *file,
554 GFileCreateFlags flags,
555 GCancellable *cancellable,
557 GFileOutputStream * g_file_replace (GFile *file,
559 gboolean make_backup,
560 GFileCreateFlags flags,
561 GCancellable *cancellable,
563 void g_file_append_to_async (GFile *file,
564 GFileCreateFlags flags,
566 GCancellable *cancellable,
567 GAsyncReadyCallback callback,
569 GFileOutputStream * g_file_append_to_finish (GFile *file,
572 void g_file_create_async (GFile *file,
573 GFileCreateFlags flags,
575 GCancellable *cancellable,
576 GAsyncReadyCallback callback,
578 GFileOutputStream * g_file_create_finish (GFile *file,
581 void g_file_replace_async (GFile *file,
583 gboolean make_backup,
584 GFileCreateFlags flags,
586 GCancellable *cancellable,
587 GAsyncReadyCallback callback,
589 GFileOutputStream * g_file_replace_finish (GFile *file,
592 GFileInfo * g_file_query_info (GFile *file,
593 const char *attributes,
594 GFileQueryInfoFlags flags,
595 GCancellable *cancellable,
597 void g_file_query_info_async (GFile *file,
598 const char *attributes,
599 GFileQueryInfoFlags flags,
601 GCancellable *cancellable,
602 GAsyncReadyCallback callback,
604 GFileInfo * g_file_query_info_finish (GFile *file,
607 GFileInfo * g_file_query_filesystem_info (GFile *file,
608 const char *attributes,
609 GCancellable *cancellable,
611 GVolume * g_file_find_enclosing_volume (GFile *file,
612 GCancellable *cancellable,
614 GFileEnumerator * g_file_enumerate_children (GFile *file,
615 const char *attributes,
616 GFileQueryInfoFlags flags,
617 GCancellable *cancellable,
619 void g_file_enumerate_children_async (GFile *file,
620 const char *attributes,
621 GFileQueryInfoFlags flags,
623 GCancellable *cancellable,
624 GAsyncReadyCallback callback,
626 GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
629 GFile * g_file_set_display_name (GFile *file,
630 const char *display_name,
631 GCancellable *cancellable,
633 void g_file_set_display_name_async (GFile *file,
634 const char *display_name,
636 GCancellable *cancellable,
637 GAsyncReadyCallback callback,
639 GFile * g_file_set_display_name_finish (GFile *file,
642 gboolean g_file_delete (GFile *file,
643 GCancellable *cancellable,
645 gboolean g_file_trash (GFile *file,
646 GCancellable *cancellable,
648 gboolean g_file_copy (GFile *source,
650 GFileCopyFlags flags,
651 GCancellable *cancellable,
652 GFileProgressCallback progress_callback,
653 gpointer progress_callback_data,
655 gboolean g_file_move (GFile *source,
657 GFileCopyFlags flags,
658 GCancellable *cancellable,
659 GFileProgressCallback progress_callback,
660 gpointer progress_callback_data,
662 gboolean g_file_make_directory (GFile *file,
663 GCancellable *cancellable,
665 gboolean g_file_make_symbolic_link (GFile *file,
666 const char *symlink_value,
667 GCancellable *cancellable,
669 GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
670 GCancellable *cancellable,
672 GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
673 GCancellable *cancellable,
675 gboolean g_file_set_attribute (GFile *file,
676 const char *attribute,
677 const GFileAttributeValue *value,
678 GFileQueryInfoFlags flags,
679 GCancellable *cancellable,
681 gboolean g_file_set_attributes_from_info (GFile *file,
683 GFileQueryInfoFlags flags,
684 GCancellable *cancellable,
686 void g_file_set_attributes_async (GFile *file,
688 GFileQueryInfoFlags flags,
690 GCancellable *cancellable,
691 GAsyncReadyCallback callback,
693 gboolean g_file_set_attributes_finish (GFile *file,
694 GAsyncResult *result,
697 gboolean g_file_set_attribute_string (GFile *file,
698 const char *attribute,
700 GFileQueryInfoFlags flags,
701 GCancellable *cancellable,
703 gboolean g_file_set_attribute_byte_string (GFile *file,
704 const char *attribute,
706 GFileQueryInfoFlags flags,
707 GCancellable *cancellable,
709 gboolean g_file_set_attribute_uint32 (GFile *file,
710 const char *attribute,
712 GFileQueryInfoFlags flags,
713 GCancellable *cancellable,
715 gboolean g_file_set_attribute_int32 (GFile *file,
716 const char *attribute,
718 GFileQueryInfoFlags flags,
719 GCancellable *cancellable,
721 gboolean g_file_set_attribute_uint64 (GFile *file,
722 const char *attribute,
724 GFileQueryInfoFlags flags,
725 GCancellable *cancellable,
727 gboolean g_file_set_attribute_int64 (GFile *file,
728 const char *attribute,
730 GFileQueryInfoFlags flags,
731 GCancellable *cancellable,
733 void g_mount_for_location (GFile *location,
734 GMountOperation *mount_operation,
735 GCancellable *cancellable,
736 GAsyncReadyCallback callback,
738 gboolean g_mount_for_location_finish (GFile *location,
739 GAsyncResult *result,
741 void g_file_mount_mountable (GFile *file,
742 GMountOperation *mount_operation,
743 GCancellable *cancellable,
744 GAsyncReadyCallback callback,
746 GFile * g_file_mount_mountable_finish (GFile *file,
747 GAsyncResult *result,
749 void g_file_unmount_mountable (GFile *file,
750 GCancellable *cancellable,
751 GAsyncReadyCallback callback,
753 gboolean g_file_unmount_mountable_finish (GFile *file,
754 GAsyncResult *result,
756 void g_file_eject_mountable (GFile *file,
757 GCancellable *cancellable,
758 GAsyncReadyCallback callback,
760 gboolean g_file_eject_mountable_finish (GFile *file,
761 GAsyncResult *result,
764 gboolean g_file_copy_attributes (GFile *source,
766 GFileCopyFlags flags,
767 GCancellable *cancellable,
771 GDirectoryMonitor* g_file_monitor_directory (GFile *file,
772 GFileMonitorFlags flags,
773 GCancellable *cancellable);
774 GFileMonitor* g_file_monitor_file (GFile *file,
775 GFileMonitorFlags flags,
776 GCancellable *cancellable);
781 gboolean g_file_load_contents (GFile *file,
782 GCancellable *cancellable,
787 void g_file_load_contents_async (GFile *file,
788 GCancellable *cancellable,
789 GAsyncReadyCallback callback,
791 gboolean g_file_load_contents_finish (GFile *file,
797 void g_file_load_partial_contents_async (GFile *file,
798 GCancellable *cancellable,
799 GFileReadMoreCallback read_more_callback,
800 GAsyncReadyCallback callback,
802 gboolean g_file_load_partial_contents_finish (GFile *file,
808 gboolean g_file_replace_contents (GFile *file,
809 const char *contents,
812 gboolean make_backup,
813 GFileCreateFlags flags,
815 GCancellable *cancellable,
817 void g_file_replace_contents_async (GFile *file,
818 const char *contents,
821 gboolean make_backup,
822 GFileCreateFlags flags,
823 GCancellable *cancellable,
824 GAsyncReadyCallback callback,
826 gboolean g_file_replace_contents_finish (GFile *file,
833 #endif /* __G_FILE_H__ */