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_FLAGS_NONE = 0,
48 G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1<<0) /*< nick=nofollow-symlinks >*/
49 } GFileQueryInfoFlags;
53 * @G_FILE_CREATE_FLAGS_NONE: No flags set.
54 * @G_FILE_CREATE_FLAGS_PRIVATE: Create a file that can only be
55 * accessed by the current user.
57 * Flags used when an operation may create a file.
60 G_FILE_CREATE_FLAGS_NONE = 0,
61 G_FILE_CREATE_FLAGS_PRIVATE = (1<<0)
66 * @G_FILE_COPY_FLAGS_NONE: No flags set.
67 * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
68 * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
69 * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
70 * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
71 * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
73 * Flags used when copying or moving files.
76 G_FILE_COPY_FLAGS_NONE = 0, /*< nick=none >*/
77 G_FILE_COPY_OVERWRITE = (1<<0),
78 G_FILE_COPY_BACKUP = (1<<1),
79 G_FILE_COPY_NOFOLLOW_SYMLINKS = (1<<2),
80 G_FILE_COPY_ALL_METADATA = (1<<3),
81 G_FILE_COPY_NO_FALLBACK_FOR_MOVE = (1<<4)
86 * @G_FILE_MONITOR_FLAGS_NONE: No flags set.
87 * @G_FILE_MONITOR_FLAGS_MONITOR_MOUNTS: Watch for mount events.
89 * Flags used to set what a #GFileMonitor or #GDirectoryMonitor will watch for.
92 G_FILE_MONITOR_FLAGS_NONE = 0,
93 G_FILE_MONITOR_FLAGS_MONITOR_MOUNTS = (1<<0)
99 * A handle to an object implementing the #GFileIface interface.
100 * Generally stores a location within the file system. Handles do not
101 * necessarily represent files or directories that currently exist.
103 typedef struct _GFile GFile; /* Dummy typedef */
104 typedef struct _GFileIface GFileIface;
105 typedef struct _GDirectoryMonitor GDirectoryMonitor;
106 typedef struct _GFileMonitor GFileMonitor;
111 * A handle to an object implementing the #GMountIface interface.
113 typedef struct _GMount GMount; /* Dummy typedef */
116 * GFileProgressCallback:
117 * @current_num_bytes: the current number of bytes in the operation.
118 * @total_num_bytes: the total number of bytes in the operation.
119 * @user_data: user data passed to the callback.
121 * When doing file operations that may take a while, such as moving
122 * a file or copying a file, a progress callback is used to pass how
123 * far along that operation is to the application.
125 typedef void (*GFileProgressCallback) (goffset current_num_bytes,
126 goffset total_num_bytes,
130 * GFileReadMoreCallback:
131 * @file_contents: the data as currently read.
132 * @file_size: the size of the data currently read.
133 * @callback_data: data passed to the callback.
135 * When loading the partial contents of a file with g_file_read_partial_contents(),
136 * it may become necessary to determine if any more data from the file should be loaded.
137 * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
138 * should be read, or %FALSE otherwise.
140 * Returns: %TRUE if more data should be read back. %FALSE otherwise.
142 typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
144 gpointer callback_data);
148 * @g_iface: The parent interface.
149 * @dup: Duplicates a #GFile.
150 * @hash: Creates a hash of a #GFile.
151 * @equal: Checks equality of two given #GFile<!-- -->s.
152 * @is_native: Checks to see if a file is native to the system.
153 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
154 * @get_uri_scheme: Gets the URI scheme for a #GFile.
155 * @get_basename: Gets the basename for a given #GFile.
156 * @get_path: Gets the current path within a #GFile.
157 * @get_uri: Gets a URI for the path within a #GFile.
158 * @get_parse_name: Gets the parsed name for the #GFile.
159 * @get_parent: Gets the parent directory for the #GFile.
160 * @contains_file: Checks whether a #GFile contains a specified file.
161 * @get_relative_path: Gets the path for a #GFile relative to a given path.
162 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
163 * @get_child_for_display_name: Gets the child #GFile for a given display name.
164 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
165 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
166 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
167 * @query_info: Gets the #GFileInfo for a #GFile.
168 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
169 * @query_info_finish: Finishes an asynchronous query info operation.
170 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
171 * @_query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
172 * @_query_filesystem_info_finish: Finishes asynchronously getting the file system info.
173 * @find_enclosing_mount: Gets a #GMount for the #GFile.
174 * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
175 * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
176 * @set_display_name: Sets the display name for a #GFile.
177 * @set_display_name_async: Asynchronously sets a #GFile's display name.
178 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
179 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
180 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
181 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
182 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
183 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
184 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
185 * @set_attribute: Sets a #GFileAttribute.
186 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
187 * @set_attributes_async: Asynchronously sets a file's attributes.
188 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
189 * @read_fn: Reads a file asynchronously.
190 * @read_async: Asynchronously reads a file.
191 * @read_finish: Finishes asynchronously reading a file.
192 * @append_to: Writes to the end of a file.
193 * @append_to_async: Asynchronously writes to the end of a file.
194 * @append_to_finish: Finishes an asynchronous file append operation.
195 * @create: Creates a new file.
196 * @create_async: Asynchronously creates a file.
197 * @create_finish: Finishes asynchronously creating a file.
198 * @replace: Replaces the contents of a file.
199 * @replace_async: Asynchronously replaces the contents of a file.
200 * @replace_finish: Finishes asynchronously replacing a file.
201 * @delete_file: Deletes a file.
202 * @_delete_file_async: Asynchronously deletes a file.
203 * @_delete_file_finish: Finishes an asynchronous delete.
204 * @trash: Sends a #GFile to the Trash location.
205 * @_trash_async: Asynchronously sends a #GFile to the Trash location.
206 * @_trash_finish: Finishes an asynchronous file trashing operation.
207 * @make_directory: Makes a directory.
208 * @_make_directory_async: Asynchronously makes a directory.
209 * @_make_directory_finish: Finishes making a directory asynchronously.
210 * @make_symbolic_link: Makes a symbolic link.
211 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
212 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
213 * @copy: Copies a file.
214 * @_copy_async: Asynchronously copies a file.
215 * @_copy_finish: Finishes an asynchronous copy operation.
216 * @move: Moves a file.
217 * @_move_async: Asynchronously moves a file.
218 * @_move_finish: Finishes an asynchronous move operation.
219 * @mount_mountable: Mounts a mountable object.
220 * @mount_mountable_finish: Finishes a mounting operation.
221 * @unmount_mountable: Unmounts a mountable object.
222 * @unmount_mountable_finish: Finishes an unmount operation.
223 * @eject_mountable: Ejects a mountable.
224 * @eject_mountable_finish: Finishes an eject operation.
225 * @mount_for_location: Mounts a specified location.
226 * @mount_for_location_finish: Finishes mounting a specified location.
227 * @monitor_dir: Creates a #GDirectoryMonitor for the location.
228 * @monitor_file: Creates a #GFileMonitor for the location.
230 * An interface for writing VFS file handles.
234 GTypeInterface g_iface;
238 GFile * (*dup) (GFile *file);
239 guint (*hash) (GFile *file);
240 gboolean (*equal) (GFile *file1,
242 gboolean (*is_native) (GFile *file);
243 gboolean (*has_uri_scheme) (GFile *file,
244 const char *uri_scheme);
245 char * (*get_uri_scheme) (GFile *file);
246 char * (*get_basename) (GFile *file);
247 char * (*get_path) (GFile *file);
248 char * (*get_uri) (GFile *file);
249 char * (*get_parse_name) (GFile *file);
250 GFile * (*get_parent) (GFile *file);
251 gboolean (*contains_file) (GFile *parent,
253 char * (*get_relative_path) (GFile *parent,
255 GFile * (*resolve_relative_path) (GFile *file,
256 const char *relative_path);
257 GFile * (*get_child_for_display_name) (GFile *file,
258 const char *display_name,
261 GFileEnumerator * (*enumerate_children) (GFile *file,
262 const char *attributes,
263 GFileQueryInfoFlags flags,
264 GCancellable *cancellable,
266 void (*enumerate_children_async) (GFile *file,
267 const char *attributes,
268 GFileQueryInfoFlags flags,
270 GCancellable *cancellable,
271 GAsyncReadyCallback callback,
273 GFileEnumerator * (*enumerate_children_finish) (GFile *file,
277 GFileInfo * (*query_info) (GFile *file,
278 const char *attributes,
279 GFileQueryInfoFlags flags,
280 GCancellable *cancellable,
282 void (*query_info_async) (GFile *file,
283 const char *attributes,
284 GFileQueryInfoFlags flags,
286 GCancellable *cancellable,
287 GAsyncReadyCallback callback,
289 GFileInfo * (*query_info_finish) (GFile *file,
293 GFileInfo * (*query_filesystem_info)(GFile *file,
294 const char *attributes,
295 GCancellable *cancellable,
297 void (*_query_filesystem_info_async) (void);
298 void (*_query_filesystem_info_finish) (void);
300 GMount * (*find_enclosing_mount)(GFile *file,
301 GCancellable *cancellable,
303 void (*find_enclosing_mount_async)(GFile *file,
305 GCancellable *cancellable,
306 GAsyncReadyCallback callback,
308 GMount * (*find_enclosing_mount_finish)(GFile *file,
312 GFile * (*set_display_name) (GFile *file,
313 const char *display_name,
314 GCancellable *cancellable,
316 void (*set_display_name_async) (GFile *file,
317 const char *display_name,
319 GCancellable *cancellable,
320 GAsyncReadyCallback callback,
322 GFile * (*set_display_name_finish) (GFile *file,
326 GFileAttributeInfoList * (*query_settable_attributes) (GFile *file,
327 GCancellable *cancellable,
329 void (*_query_settable_attributes_async) (void);
330 void (*_query_settable_attributes_finish) (void);
332 GFileAttributeInfoList * (*query_writable_namespaces) (GFile *file,
333 GCancellable *cancellable,
335 void (*_query_writable_namespaces_async) (void);
336 void (*_query_writable_namespaces_finish) (void);
338 gboolean (*set_attribute) (GFile *file,
339 const char *attribute,
340 const GFileAttributeValue *value,
341 GFileQueryInfoFlags flags,
342 GCancellable *cancellable,
344 gboolean (*set_attributes_from_info) (GFile *file,
346 GFileQueryInfoFlags flags,
347 GCancellable *cancellable,
349 void (*set_attributes_async) (GFile *file,
351 GFileQueryInfoFlags flags,
353 GCancellable *cancellable,
354 GAsyncReadyCallback callback,
356 gboolean (*set_attributes_finish) (GFile *file,
357 GAsyncResult *result,
361 GFileInputStream * (*read_fn) (GFile *file,
362 GCancellable *cancellable,
364 void (*read_async) (GFile *file,
366 GCancellable *cancellable,
367 GAsyncReadyCallback callback,
369 GFileInputStream * (*read_finish) (GFile *file,
373 GFileOutputStream * (*append_to) (GFile *file,
374 GFileCreateFlags flags,
375 GCancellable *cancellable,
377 void (*append_to_async) (GFile *file,
378 GFileCreateFlags flags,
380 GCancellable *cancellable,
381 GAsyncReadyCallback callback,
383 GFileOutputStream * (*append_to_finish) (GFile *file,
387 GFileOutputStream * (*create) (GFile *file,
388 GFileCreateFlags flags,
389 GCancellable *cancellable,
391 void (*create_async) (GFile *file,
392 GFileCreateFlags flags,
394 GCancellable *cancellable,
395 GAsyncReadyCallback callback,
397 GFileOutputStream * (*create_finish) (GFile *file,
401 GFileOutputStream * (*replace) (GFile *file,
403 gboolean make_backup,
404 GFileCreateFlags flags,
405 GCancellable *cancellable,
407 void (*replace_async) (GFile *file,
409 gboolean make_backup,
410 GFileCreateFlags flags,
412 GCancellable *cancellable,
413 GAsyncReadyCallback callback,
415 GFileOutputStream * (*replace_finish) (GFile *file,
419 gboolean (*delete_file) (GFile *file,
420 GCancellable *cancellable,
422 void (*_delete_file_async) (void);
423 void (*_delete_file_finish) (void);
425 gboolean (*trash) (GFile *file,
426 GCancellable *cancellable,
428 void (*_trash_async) (void);
429 void (*_trash_finish) (void);
431 gboolean (*make_directory) (GFile *file,
432 GCancellable *cancellable,
434 void (*_make_directory_async) (void);
435 void (*_make_directory_finish) (void);
437 gboolean (*make_symbolic_link) (GFile *file,
438 const char *symlink_value,
439 GCancellable *cancellable,
441 void (*_make_symbolic_link_async) (void);
442 void (*_make_symbolic_link_finish) (void);
444 gboolean (*copy) (GFile *source,
446 GFileCopyFlags flags,
447 GCancellable *cancellable,
448 GFileProgressCallback progress_callback,
449 gpointer progress_callback_data,
451 void (*_copy_async) (void);
452 void (*_copy_finish) (void);
454 gboolean (*move) (GFile *source,
456 GFileCopyFlags flags,
457 GCancellable *cancellable,
458 GFileProgressCallback progress_callback,
459 gpointer progress_callback_data,
462 void (*_move_async) (void);
463 void (*_move_finish) (void);
466 void (*mount_mountable) (GFile *file,
467 GMountOperation *mount_operation,
468 GCancellable *cancellable,
469 GAsyncReadyCallback callback,
471 GFile * (*mount_mountable_finish) (GFile *file,
472 GAsyncResult *result,
474 void (*unmount_mountable) (GFile *file,
475 GCancellable *cancellable,
476 GAsyncReadyCallback callback,
478 gboolean (*unmount_mountable_finish) (GFile *file,
479 GAsyncResult *result,
481 void (*eject_mountable) (GFile *file,
482 GCancellable *cancellable,
483 GAsyncReadyCallback callback,
485 gboolean (*eject_mountable_finish) (GFile *file,
486 GAsyncResult *result,
490 void (*mount_for_location) (GFile *location,
491 GMountOperation *mount_operation,
492 GCancellable *cancellable,
493 GAsyncReadyCallback callback,
495 gboolean (*mount_for_location_finish) (GFile *location,
496 GAsyncResult *result,
499 GDirectoryMonitor* (*monitor_dir) (GFile *file,
500 GFileMonitorFlags flags,
501 GCancellable *cancellable);
503 GFileMonitor* (*monitor_file) (GFile *file,
504 GFileMonitorFlags flags,
505 GCancellable *cancellable);
509 GType g_file_get_type (void) G_GNUC_CONST;
511 GFile * g_file_new_for_path (const char *path);
512 GFile * g_file_new_for_uri (const char *uri);
513 GFile * g_file_new_for_commandline_arg (const char *arg);
514 GFile * g_file_parse_name (const char *parse_name);
515 GFile * g_file_dup (GFile *file);
516 guint g_file_hash (gconstpointer file);
517 gboolean g_file_equal (GFile *file1,
519 char * g_file_get_basename (GFile *file);
520 char * g_file_get_path (GFile *file);
521 char * g_file_get_uri (GFile *file);
522 char * g_file_get_parse_name (GFile *file);
523 GFile * g_file_get_parent (GFile *file);
524 GFile * g_file_get_child (GFile *file,
526 GFile * g_file_get_child_for_display_name (GFile *file,
527 const char *display_name,
529 gboolean g_file_contains_file (GFile *parent,
531 char * g_file_get_relative_path (GFile *parent,
533 GFile * g_file_resolve_relative_path (GFile *file,
534 const char *relative_path);
535 gboolean g_file_is_native (GFile *file);
536 gboolean g_file_has_uri_scheme (GFile *file,
537 const char *uri_scheme);
538 char * g_file_get_uri_scheme (GFile *file);
539 GFileInputStream * g_file_read (GFile *file,
540 GCancellable *cancellable,
542 void g_file_read_async (GFile *file,
544 GCancellable *cancellable,
545 GAsyncReadyCallback callback,
547 GFileInputStream * g_file_read_finish (GFile *file,
550 GFileOutputStream * g_file_append_to (GFile *file,
551 GFileCreateFlags flags,
552 GCancellable *cancellable,
554 GFileOutputStream * g_file_create (GFile *file,
555 GFileCreateFlags flags,
556 GCancellable *cancellable,
558 GFileOutputStream * g_file_replace (GFile *file,
560 gboolean make_backup,
561 GFileCreateFlags flags,
562 GCancellable *cancellable,
564 void g_file_append_to_async (GFile *file,
565 GFileCreateFlags flags,
567 GCancellable *cancellable,
568 GAsyncReadyCallback callback,
570 GFileOutputStream * g_file_append_to_finish (GFile *file,
573 void g_file_create_async (GFile *file,
574 GFileCreateFlags flags,
576 GCancellable *cancellable,
577 GAsyncReadyCallback callback,
579 GFileOutputStream * g_file_create_finish (GFile *file,
582 void g_file_replace_async (GFile *file,
584 gboolean make_backup,
585 GFileCreateFlags flags,
587 GCancellable *cancellable,
588 GAsyncReadyCallback callback,
590 GFileOutputStream * g_file_replace_finish (GFile *file,
593 GFileInfo * g_file_query_info (GFile *file,
594 const char *attributes,
595 GFileQueryInfoFlags flags,
596 GCancellable *cancellable,
598 void g_file_query_info_async (GFile *file,
599 const char *attributes,
600 GFileQueryInfoFlags flags,
602 GCancellable *cancellable,
603 GAsyncReadyCallback callback,
605 GFileInfo * g_file_query_info_finish (GFile *file,
608 GFileInfo * g_file_query_filesystem_info (GFile *file,
609 const char *attributes,
610 GCancellable *cancellable,
612 GMount * g_file_find_enclosing_mount (GFile *file,
613 GCancellable *cancellable,
615 GFileEnumerator * g_file_enumerate_children (GFile *file,
616 const char *attributes,
617 GFileQueryInfoFlags flags,
618 GCancellable *cancellable,
620 void g_file_enumerate_children_async (GFile *file,
621 const char *attributes,
622 GFileQueryInfoFlags flags,
624 GCancellable *cancellable,
625 GAsyncReadyCallback callback,
627 GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
630 GFile * g_file_set_display_name (GFile *file,
631 const char *display_name,
632 GCancellable *cancellable,
634 void g_file_set_display_name_async (GFile *file,
635 const char *display_name,
637 GCancellable *cancellable,
638 GAsyncReadyCallback callback,
640 GFile * g_file_set_display_name_finish (GFile *file,
643 gboolean g_file_delete (GFile *file,
644 GCancellable *cancellable,
646 gboolean g_file_trash (GFile *file,
647 GCancellable *cancellable,
649 gboolean g_file_copy (GFile *source,
651 GFileCopyFlags flags,
652 GCancellable *cancellable,
653 GFileProgressCallback progress_callback,
654 gpointer progress_callback_data,
656 gboolean g_file_move (GFile *source,
658 GFileCopyFlags flags,
659 GCancellable *cancellable,
660 GFileProgressCallback progress_callback,
661 gpointer progress_callback_data,
663 gboolean g_file_make_directory (GFile *file,
664 GCancellable *cancellable,
666 gboolean g_file_make_symbolic_link (GFile *file,
667 const char *symlink_value,
668 GCancellable *cancellable,
670 GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
671 GCancellable *cancellable,
673 GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
674 GCancellable *cancellable,
676 gboolean g_file_set_attribute (GFile *file,
677 const char *attribute,
678 const GFileAttributeValue *value,
679 GFileQueryInfoFlags flags,
680 GCancellable *cancellable,
682 gboolean g_file_set_attributes_from_info (GFile *file,
684 GFileQueryInfoFlags flags,
685 GCancellable *cancellable,
687 void g_file_set_attributes_async (GFile *file,
689 GFileQueryInfoFlags flags,
691 GCancellable *cancellable,
692 GAsyncReadyCallback callback,
694 gboolean g_file_set_attributes_finish (GFile *file,
695 GAsyncResult *result,
698 gboolean g_file_set_attribute_string (GFile *file,
699 const char *attribute,
701 GFileQueryInfoFlags flags,
702 GCancellable *cancellable,
704 gboolean g_file_set_attribute_byte_string (GFile *file,
705 const char *attribute,
707 GFileQueryInfoFlags flags,
708 GCancellable *cancellable,
710 gboolean g_file_set_attribute_uint32 (GFile *file,
711 const char *attribute,
713 GFileQueryInfoFlags flags,
714 GCancellable *cancellable,
716 gboolean g_file_set_attribute_int32 (GFile *file,
717 const char *attribute,
719 GFileQueryInfoFlags flags,
720 GCancellable *cancellable,
722 gboolean g_file_set_attribute_uint64 (GFile *file,
723 const char *attribute,
725 GFileQueryInfoFlags flags,
726 GCancellable *cancellable,
728 gboolean g_file_set_attribute_int64 (GFile *file,
729 const char *attribute,
731 GFileQueryInfoFlags flags,
732 GCancellable *cancellable,
734 void g_mount_for_location (GFile *location,
735 GMountOperation *mount_operation,
736 GCancellable *cancellable,
737 GAsyncReadyCallback callback,
739 gboolean g_mount_for_location_finish (GFile *location,
740 GAsyncResult *result,
742 void g_file_mount_mountable (GFile *file,
743 GMountOperation *mount_operation,
744 GCancellable *cancellable,
745 GAsyncReadyCallback callback,
747 GFile * g_file_mount_mountable_finish (GFile *file,
748 GAsyncResult *result,
750 void g_file_unmount_mountable (GFile *file,
751 GCancellable *cancellable,
752 GAsyncReadyCallback callback,
754 gboolean g_file_unmount_mountable_finish (GFile *file,
755 GAsyncResult *result,
757 void g_file_eject_mountable (GFile *file,
758 GCancellable *cancellable,
759 GAsyncReadyCallback callback,
761 gboolean g_file_eject_mountable_finish (GFile *file,
762 GAsyncResult *result,
765 gboolean g_file_copy_attributes (GFile *source,
767 GFileCopyFlags flags,
768 GCancellable *cancellable,
772 GDirectoryMonitor* g_file_monitor_directory (GFile *file,
773 GFileMonitorFlags flags,
774 GCancellable *cancellable);
775 GFileMonitor* g_file_monitor_file (GFile *file,
776 GFileMonitorFlags flags,
777 GCancellable *cancellable);
782 gboolean g_file_load_contents (GFile *file,
783 GCancellable *cancellable,
788 void g_file_load_contents_async (GFile *file,
789 GCancellable *cancellable,
790 GAsyncReadyCallback callback,
792 gboolean g_file_load_contents_finish (GFile *file,
798 void g_file_load_partial_contents_async (GFile *file,
799 GCancellable *cancellable,
800 GFileReadMoreCallback read_more_callback,
801 GAsyncReadyCallback callback,
803 gboolean g_file_load_partial_contents_finish (GFile *file,
809 gboolean g_file_replace_contents (GFile *file,
810 const char *contents,
813 gboolean make_backup,
814 GFileCreateFlags flags,
816 GCancellable *cancellable,
818 void g_file_replace_contents_async (GFile *file,
819 const char *contents,
822 gboolean make_backup,
823 GFileCreateFlags flags,
824 GCancellable *cancellable,
825 GAsyncReadyCallback callback,
827 gboolean g_file_replace_contents_finish (GFile *file,
834 #endif /* __G_FILE_H__ */