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>
36 #include <gio/gappinfo.h>
40 #define G_TYPE_FILE (g_file_get_type ())
41 #define G_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE, GFile))
42 #define G_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE))
43 #define G_FILE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE, GFileIface))
46 * GFileQueryInfoFlags:
47 * @G_FILE_QUERY_INFO_NONE: No flags set.
48 * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
50 * Flags used when querying a #GFileInfo.
53 G_FILE_QUERY_INFO_NONE
= 0,
54 G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS
= (1<<0) /*< nick=nofollow-symlinks >*/
55 } GFileQueryInfoFlags
;
59 * @G_FILE_CREATE_NONE: No flags set.
60 * @G_FILE_CREATE_PRIVATE: Create a file that can only be
61 * accessed by the current user.
63 * Flags used when an operation may create a file.
66 G_FILE_CREATE_NONE
= 0,
67 G_FILE_CREATE_PRIVATE
= (1<<0)
73 * @G_MOUNT_MOUNT_NONE: No flags set.
75 * Flags used when mounting a mount.
78 G_MOUNT_MOUNT_NONE
= 0
84 * @G_MOUNT_UNMOUNT_NONE: No flags set.
85 * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding
86 * file operations on the mount.
88 * Flags used when an unmounting a mount.
91 G_MOUNT_UNMOUNT_NONE
= 0,
92 G_MOUNT_UNMOUNT_FORCE
= (1<<0)
97 * @G_FILE_COPY_NONE: No flags set.
98 * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
99 * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
100 * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
101 * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
102 * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
104 * Flags used when copying or moving files.
107 G_FILE_COPY_NONE
= 0, /*< nick=none >*/
108 G_FILE_COPY_OVERWRITE
= (1<<0),
109 G_FILE_COPY_BACKUP
= (1<<1),
110 G_FILE_COPY_NOFOLLOW_SYMLINKS
= (1<<2),
111 G_FILE_COPY_ALL_METADATA
= (1<<3),
112 G_FILE_COPY_NO_FALLBACK_FOR_MOVE
= (1<<4)
117 * @G_FILE_MONITOR_NONE: No flags set.
118 * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
120 * Flags used to set what a #GFileMonitor will watch for.
123 G_FILE_MONITOR_NONE
= 0,
124 G_FILE_MONITOR_WATCH_MOUNTS
= (1<<0)
130 * A handle to an object implementing the #GFileIface interface.
131 * Generally stores a location within the file system. Handles do not
132 * necessarily represent files or directories that currently exist.
134 typedef struct _GFile GFile
; /* Dummy typedef */
135 typedef struct _GFileIface GFileIface
;
136 typedef struct _GFileMonitor GFileMonitor
;
141 * A handle to an object implementing the #GMountIface interface.
143 typedef struct _GMount GMount
; /* Dummy typedef */
146 * GFileProgressCallback:
147 * @current_num_bytes: the current number of bytes in the operation.
148 * @total_num_bytes: the total number of bytes in the operation.
149 * @user_data: user data passed to the callback.
151 * When doing file operations that may take a while, such as moving
152 * a file or copying a file, a progress callback is used to pass how
153 * far along that operation is to the application.
155 typedef void (*GFileProgressCallback
) (goffset current_num_bytes
,
156 goffset total_num_bytes
,
160 * GFileReadMoreCallback:
161 * @file_contents: the data as currently read.
162 * @file_size: the size of the data currently read.
163 * @callback_data: data passed to the callback.
165 * When loading the partial contents of a file with g_file_read_partial_contents(),
166 * it may become necessary to determine if any more data from the file should be loaded.
167 * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
168 * should be read, or %FALSE otherwise.
170 * Returns: %TRUE if more data should be read back. %FALSE otherwise.
172 typedef gboolean (* GFileReadMoreCallback
) (const char *file_contents
,
174 gpointer callback_data
);
178 * @g_iface: The parent interface.
179 * @dup: Duplicates a #GFile.
180 * @hash: Creates a hash of a #GFile.
181 * @equal: Checks equality of two given #GFile<!-- -->s.
182 * @is_native: Checks to see if a file is native to the system.
183 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
184 * @get_uri_scheme: Gets the URI scheme for a #GFile.
185 * @get_basename: Gets the basename for a given #GFile.
186 * @get_path: Gets the current path within a #GFile.
187 * @get_uri: Gets a URI for the path within a #GFile.
188 * @get_parse_name: Gets the parsed name for the #GFile.
189 * @get_parent: Gets the parent directory for the #GFile.
190 * @prefix_matches: Checks whether a #GFile contains a specified file.
191 * @get_relative_path: Gets the path for a #GFile relative to a given path.
192 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
193 * @get_child_for_display_name: Gets the child #GFile for a given display name.
194 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
195 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
196 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
197 * @query_info: Gets the #GFileInfo for a #GFile.
198 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
199 * @query_info_finish: Finishes an asynchronous query info operation.
200 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
201 * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
202 * @query_filesystem_info_finish: Finishes asynchronously getting the file system info.
203 * @find_enclosing_mount: Gets a #GMount for the #GFile.
204 * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
205 * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
206 * @set_display_name: Sets the display name for a #GFile.
207 * @set_display_name_async: Asynchronously sets a #GFile's display name.
208 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
209 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
210 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
211 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
212 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
213 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
214 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
215 * @set_attribute: Sets a #GFileAttribute.
216 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
217 * @set_attributes_async: Asynchronously sets a file's attributes.
218 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
219 * @read_fn: Reads a file asynchronously.
220 * @read_async: Asynchronously reads a file.
221 * @read_finish: Finishes asynchronously reading a file.
222 * @append_to: Writes to the end of a file.
223 * @append_to_async: Asynchronously writes to the end of a file.
224 * @append_to_finish: Finishes an asynchronous file append operation.
225 * @create: Creates a new file.
226 * @create_async: Asynchronously creates a file.
227 * @create_finish: Finishes asynchronously creating a file.
228 * @replace: Replaces the contents of a file.
229 * @replace_async: Asynchronously replaces the contents of a file.
230 * @replace_finish: Finishes asynchronously replacing a file.
231 * @delete_file: Deletes a file.
232 * @_delete_file_async: Asynchronously deletes a file.
233 * @_delete_file_finish: Finishes an asynchronous delete.
234 * @trash: Sends a #GFile to the Trash location.
235 * @_trash_async: Asynchronously sends a #GFile to the Trash location.
236 * @_trash_finish: Finishes an asynchronous file trashing operation.
237 * @make_directory: Makes a directory.
238 * @_make_directory_async: Asynchronously makes a directory.
239 * @_make_directory_finish: Finishes making a directory asynchronously.
240 * @make_symbolic_link: Makes a symbolic link.
241 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
242 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
243 * @copy: Copies a file.
244 * @copy_async: Asynchronously copies a file.
245 * @copy_finish: Finishes an asynchronous copy operation.
246 * @move: Moves a file.
247 * @_move_async: Asynchronously moves a file.
248 * @_move_finish: Finishes an asynchronous move operation.
249 * @mount_mountable: Mounts a mountable object.
250 * @mount_mountable_finish: Finishes a mounting operation.
251 * @unmount_mountable: Unmounts a mountable object.
252 * @unmount_mountable_finish: Finishes an unmount operation.
253 * @eject_mountable: Ejects a mountable.
254 * @eject_mountable_finish: Finishes an eject operation.
255 * @mount_enclosing_volume: Mounts a specified location.
256 * @mount_enclosing_volume_finish: Finishes mounting a specified location.
257 * @monitor_dir: Creates a #GFileMonitor for the location.
258 * @monitor_file: Creates a #GFileMonitor for the location.
260 * An interface for writing VFS file handles.
264 GTypeInterface g_iface
;
268 GFile
* (*dup
) (GFile
*file
);
269 guint (*hash
) (GFile
*file
);
270 gboolean (*equal
) (GFile
*file1
,
272 gboolean (*is_native
) (GFile
*file
);
273 gboolean (*has_uri_scheme
) (GFile
*file
,
274 const char *uri_scheme
);
275 char * (*get_uri_scheme
) (GFile
*file
);
276 char * (*get_basename
) (GFile
*file
);
277 char * (*get_path
) (GFile
*file
);
278 char * (*get_uri
) (GFile
*file
);
279 char * (*get_parse_name
) (GFile
*file
);
280 GFile
* (*get_parent
) (GFile
*file
);
281 gboolean (*prefix_matches
) (GFile
*prefix
,
283 char * (*get_relative_path
) (GFile
*parent
,
285 GFile
* (*resolve_relative_path
) (GFile
*file
,
286 const char *relative_path
);
287 GFile
* (*get_child_for_display_name
) (GFile
*file
,
288 const char *display_name
,
291 GFileEnumerator
* (*enumerate_children
) (GFile
*file
,
292 const char *attributes
,
293 GFileQueryInfoFlags flags
,
294 GCancellable
*cancellable
,
296 void (*enumerate_children_async
) (GFile
*file
,
297 const char *attributes
,
298 GFileQueryInfoFlags flags
,
300 GCancellable
*cancellable
,
301 GAsyncReadyCallback callback
,
303 GFileEnumerator
* (*enumerate_children_finish
) (GFile
*file
,
307 GFileInfo
* (*query_info
) (GFile
*file
,
308 const char *attributes
,
309 GFileQueryInfoFlags flags
,
310 GCancellable
*cancellable
,
312 void (*query_info_async
) (GFile
*file
,
313 const char *attributes
,
314 GFileQueryInfoFlags flags
,
316 GCancellable
*cancellable
,
317 GAsyncReadyCallback callback
,
319 GFileInfo
* (*query_info_finish
) (GFile
*file
,
323 GFileInfo
* (*query_filesystem_info
)(GFile
*file
,
324 const char *attributes
,
325 GCancellable
*cancellable
,
327 void (*query_filesystem_info_async
) (GFile
*file
,
328 const char *attributes
,
330 GCancellable
*cancellable
,
331 GAsyncReadyCallback callback
,
333 GFileInfo
* (*query_filesystem_info_finish
) (GFile
*file
,
337 GMount
* (*find_enclosing_mount
)(GFile
*file
,
338 GCancellable
*cancellable
,
340 void (*find_enclosing_mount_async
)(GFile
*file
,
342 GCancellable
*cancellable
,
343 GAsyncReadyCallback callback
,
345 GMount
* (*find_enclosing_mount_finish
)(GFile
*file
,
349 GFile
* (*set_display_name
) (GFile
*file
,
350 const char *display_name
,
351 GCancellable
*cancellable
,
353 void (*set_display_name_async
) (GFile
*file
,
354 const char *display_name
,
356 GCancellable
*cancellable
,
357 GAsyncReadyCallback callback
,
359 GFile
* (*set_display_name_finish
) (GFile
*file
,
363 GFileAttributeInfoList
* (*query_settable_attributes
) (GFile
*file
,
364 GCancellable
*cancellable
,
366 void (*_query_settable_attributes_async
) (void);
367 void (*_query_settable_attributes_finish
) (void);
369 GFileAttributeInfoList
* (*query_writable_namespaces
) (GFile
*file
,
370 GCancellable
*cancellable
,
372 void (*_query_writable_namespaces_async
) (void);
373 void (*_query_writable_namespaces_finish
) (void);
375 gboolean (*set_attribute
) (GFile
*file
,
376 const char *attribute
,
377 GFileAttributeType type
,
379 GFileQueryInfoFlags flags
,
380 GCancellable
*cancellable
,
382 gboolean (*set_attributes_from_info
) (GFile
*file
,
384 GFileQueryInfoFlags flags
,
385 GCancellable
*cancellable
,
387 void (*set_attributes_async
) (GFile
*file
,
389 GFileQueryInfoFlags flags
,
391 GCancellable
*cancellable
,
392 GAsyncReadyCallback callback
,
394 gboolean (*set_attributes_finish
) (GFile
*file
,
395 GAsyncResult
*result
,
399 GFileInputStream
* (*read_fn
) (GFile
*file
,
400 GCancellable
*cancellable
,
402 void (*read_async
) (GFile
*file
,
404 GCancellable
*cancellable
,
405 GAsyncReadyCallback callback
,
407 GFileInputStream
* (*read_finish
) (GFile
*file
,
411 GFileOutputStream
* (*append_to
) (GFile
*file
,
412 GFileCreateFlags flags
,
413 GCancellable
*cancellable
,
415 void (*append_to_async
) (GFile
*file
,
416 GFileCreateFlags flags
,
418 GCancellable
*cancellable
,
419 GAsyncReadyCallback callback
,
421 GFileOutputStream
* (*append_to_finish
) (GFile
*file
,
425 GFileOutputStream
* (*create
) (GFile
*file
,
426 GFileCreateFlags flags
,
427 GCancellable
*cancellable
,
429 void (*create_async
) (GFile
*file
,
430 GFileCreateFlags flags
,
432 GCancellable
*cancellable
,
433 GAsyncReadyCallback callback
,
435 GFileOutputStream
* (*create_finish
) (GFile
*file
,
439 GFileOutputStream
* (*replace
) (GFile
*file
,
441 gboolean make_backup
,
442 GFileCreateFlags flags
,
443 GCancellable
*cancellable
,
445 void (*replace_async
) (GFile
*file
,
447 gboolean make_backup
,
448 GFileCreateFlags flags
,
450 GCancellable
*cancellable
,
451 GAsyncReadyCallback callback
,
453 GFileOutputStream
* (*replace_finish
) (GFile
*file
,
457 gboolean (*delete_file
) (GFile
*file
,
458 GCancellable
*cancellable
,
460 void (*_delete_file_async
) (void);
461 void (*_delete_file_finish
) (void);
463 gboolean (*trash
) (GFile
*file
,
464 GCancellable
*cancellable
,
466 void (*_trash_async
) (void);
467 void (*_trash_finish
) (void);
469 gboolean (*make_directory
) (GFile
*file
,
470 GCancellable
*cancellable
,
472 void (*_make_directory_async
) (void);
473 void (*_make_directory_finish
) (void);
475 gboolean (*make_symbolic_link
) (GFile
*file
,
476 const char *symlink_value
,
477 GCancellable
*cancellable
,
479 void (*_make_symbolic_link_async
) (void);
480 void (*_make_symbolic_link_finish
) (void);
482 gboolean (*copy
) (GFile
*source
,
484 GFileCopyFlags flags
,
485 GCancellable
*cancellable
,
486 GFileProgressCallback progress_callback
,
487 gpointer progress_callback_data
,
489 void (*copy_async
) (GFile
*source
,
491 GFileCopyFlags flags
,
493 GCancellable
*cancellable
,
494 GFileProgressCallback progress_callback
,
495 gpointer progress_callback_data
,
496 GAsyncReadyCallback callback
,
498 gboolean (*copy_finish
) (GFile
*file
,
502 gboolean (*move
) (GFile
*source
,
504 GFileCopyFlags flags
,
505 GCancellable
*cancellable
,
506 GFileProgressCallback progress_callback
,
507 gpointer progress_callback_data
,
510 void (*_move_async
) (void);
511 void (*_move_finish
) (void);
514 void (*mount_mountable
) (GFile
*file
,
515 GMountMountFlags flags
,
516 GMountOperation
*mount_operation
,
517 GCancellable
*cancellable
,
518 GAsyncReadyCallback callback
,
520 GFile
* (*mount_mountable_finish
) (GFile
*file
,
521 GAsyncResult
*result
,
523 void (*unmount_mountable
) (GFile
*file
,
524 GMountUnmountFlags flags
,
525 GCancellable
*cancellable
,
526 GAsyncReadyCallback callback
,
528 gboolean (*unmount_mountable_finish
) (GFile
*file
,
529 GAsyncResult
*result
,
531 void (*eject_mountable
) (GFile
*file
,
532 GMountUnmountFlags flags
,
533 GCancellable
*cancellable
,
534 GAsyncReadyCallback callback
,
536 gboolean (*eject_mountable_finish
) (GFile
*file
,
537 GAsyncResult
*result
,
541 void (*mount_enclosing_volume
) (GFile
*location
,
542 GMountMountFlags flags
,
543 GMountOperation
*mount_operation
,
544 GCancellable
*cancellable
,
545 GAsyncReadyCallback callback
,
547 gboolean (*mount_enclosing_volume_finish
) (GFile
*location
,
548 GAsyncResult
*result
,
551 GFileMonitor
* (*monitor_dir
) (GFile
*file
,
552 GFileMonitorFlags flags
,
553 GCancellable
*cancellable
,
556 GFileMonitor
* (*monitor_file
) (GFile
*file
,
557 GFileMonitorFlags flags
,
558 GCancellable
*cancellable
,
563 GType
g_file_get_type (void) G_GNUC_CONST
;
565 GFile
* g_file_new_for_path (const char *path
);
566 GFile
* g_file_new_for_uri (const char *uri
);
567 GFile
* g_file_new_for_commandline_arg (const char *arg
);
568 GFile
* g_file_parse_name (const char *parse_name
);
569 GFile
* g_file_dup (GFile
*file
);
570 guint
g_file_hash (gconstpointer file
);
571 gboolean
g_file_equal (GFile
*file1
,
573 char * g_file_get_basename (GFile
*file
);
574 char * g_file_get_path (GFile
*file
);
575 char * g_file_get_uri (GFile
*file
);
576 char * g_file_get_parse_name (GFile
*file
);
577 GFile
* g_file_get_parent (GFile
*file
);
578 GFile
* g_file_get_child (GFile
*file
,
580 GFile
* g_file_get_child_for_display_name (GFile
*file
,
581 const char *display_name
,
583 gboolean
g_file_has_prefix (GFile
*file
,
585 char * g_file_get_relative_path (GFile
*parent
,
587 GFile
* g_file_resolve_relative_path (GFile
*file
,
588 const char *relative_path
);
589 gboolean
g_file_is_native (GFile
*file
);
590 gboolean
g_file_has_uri_scheme (GFile
*file
,
591 const char *uri_scheme
);
592 char * g_file_get_uri_scheme (GFile
*file
);
593 GFileInputStream
* g_file_read (GFile
*file
,
594 GCancellable
*cancellable
,
596 void g_file_read_async (GFile
*file
,
598 GCancellable
*cancellable
,
599 GAsyncReadyCallback callback
,
601 GFileInputStream
* g_file_read_finish (GFile
*file
,
604 GFileOutputStream
* g_file_append_to (GFile
*file
,
605 GFileCreateFlags flags
,
606 GCancellable
*cancellable
,
608 GFileOutputStream
* g_file_create (GFile
*file
,
609 GFileCreateFlags flags
,
610 GCancellable
*cancellable
,
612 GFileOutputStream
* g_file_replace (GFile
*file
,
614 gboolean make_backup
,
615 GFileCreateFlags flags
,
616 GCancellable
*cancellable
,
618 void g_file_append_to_async (GFile
*file
,
619 GFileCreateFlags flags
,
621 GCancellable
*cancellable
,
622 GAsyncReadyCallback callback
,
624 GFileOutputStream
* g_file_append_to_finish (GFile
*file
,
627 void g_file_create_async (GFile
*file
,
628 GFileCreateFlags flags
,
630 GCancellable
*cancellable
,
631 GAsyncReadyCallback callback
,
633 GFileOutputStream
* g_file_create_finish (GFile
*file
,
636 void g_file_replace_async (GFile
*file
,
638 gboolean make_backup
,
639 GFileCreateFlags flags
,
641 GCancellable
*cancellable
,
642 GAsyncReadyCallback callback
,
644 GFileOutputStream
* g_file_replace_finish (GFile
*file
,
647 gboolean
g_file_query_exists (GFile
*file
,
648 GCancellable
*cancellable
);
649 GFileType
g_file_query_file_type (GFile
*file
,
650 GFileQueryInfoFlags flags
,
651 GCancellable
*cancellable
);
652 GFileInfo
* g_file_query_info (GFile
*file
,
653 const char *attributes
,
654 GFileQueryInfoFlags flags
,
655 GCancellable
*cancellable
,
657 void g_file_query_info_async (GFile
*file
,
658 const char *attributes
,
659 GFileQueryInfoFlags flags
,
661 GCancellable
*cancellable
,
662 GAsyncReadyCallback callback
,
664 GFileInfo
* g_file_query_info_finish (GFile
*file
,
667 GFileInfo
* g_file_query_filesystem_info (GFile
*file
,
668 const char *attributes
,
669 GCancellable
*cancellable
,
671 void g_file_query_filesystem_info_async (GFile
*file
,
672 const char *attributes
,
674 GCancellable
*cancellable
,
675 GAsyncReadyCallback callback
,
677 GFileInfo
* g_file_query_filesystem_info_finish (GFile
*file
,
680 GMount
* g_file_find_enclosing_mount (GFile
*file
,
681 GCancellable
*cancellable
,
683 void g_file_find_enclosing_mount_async (GFile
*file
,
685 GCancellable
*cancellable
,
686 GAsyncReadyCallback callback
,
688 GMount
* g_file_find_enclosing_mount_finish (GFile
*file
,
691 GFileEnumerator
* g_file_enumerate_children (GFile
*file
,
692 const char *attributes
,
693 GFileQueryInfoFlags flags
,
694 GCancellable
*cancellable
,
696 void g_file_enumerate_children_async (GFile
*file
,
697 const char *attributes
,
698 GFileQueryInfoFlags flags
,
700 GCancellable
*cancellable
,
701 GAsyncReadyCallback callback
,
703 GFileEnumerator
* g_file_enumerate_children_finish (GFile
*file
,
706 GFile
* g_file_set_display_name (GFile
*file
,
707 const char *display_name
,
708 GCancellable
*cancellable
,
710 void g_file_set_display_name_async (GFile
*file
,
711 const char *display_name
,
713 GCancellable
*cancellable
,
714 GAsyncReadyCallback callback
,
716 GFile
* g_file_set_display_name_finish (GFile
*file
,
719 gboolean
g_file_delete (GFile
*file
,
720 GCancellable
*cancellable
,
722 gboolean
g_file_trash (GFile
*file
,
723 GCancellable
*cancellable
,
725 gboolean
g_file_copy (GFile
*source
,
727 GFileCopyFlags flags
,
728 GCancellable
*cancellable
,
729 GFileProgressCallback progress_callback
,
730 gpointer progress_callback_data
,
732 void g_file_copy_async (GFile
*source
,
734 GFileCopyFlags flags
,
736 GCancellable
*cancellable
,
737 GFileProgressCallback progress_callback
,
738 gpointer progress_callback_data
,
739 GAsyncReadyCallback callback
,
741 gboolean
g_file_copy_finish (GFile
*file
,
744 gboolean
g_file_move (GFile
*source
,
746 GFileCopyFlags flags
,
747 GCancellable
*cancellable
,
748 GFileProgressCallback progress_callback
,
749 gpointer progress_callback_data
,
751 gboolean
g_file_make_directory (GFile
*file
,
752 GCancellable
*cancellable
,
754 gboolean
g_file_make_symbolic_link (GFile
*file
,
755 const char *symlink_value
,
756 GCancellable
*cancellable
,
758 GFileAttributeInfoList
*g_file_query_settable_attributes (GFile
*file
,
759 GCancellable
*cancellable
,
761 GFileAttributeInfoList
*g_file_query_writable_namespaces (GFile
*file
,
762 GCancellable
*cancellable
,
764 gboolean
g_file_set_attribute (GFile
*file
,
765 const char *attribute
,
766 GFileAttributeType type
,
768 GFileQueryInfoFlags flags
,
769 GCancellable
*cancellable
,
771 gboolean
g_file_set_attributes_from_info (GFile
*file
,
773 GFileQueryInfoFlags flags
,
774 GCancellable
*cancellable
,
776 void g_file_set_attributes_async (GFile
*file
,
778 GFileQueryInfoFlags flags
,
780 GCancellable
*cancellable
,
781 GAsyncReadyCallback callback
,
783 gboolean
g_file_set_attributes_finish (GFile
*file
,
784 GAsyncResult
*result
,
787 gboolean
g_file_set_attribute_string (GFile
*file
,
788 const char *attribute
,
790 GFileQueryInfoFlags flags
,
791 GCancellable
*cancellable
,
793 gboolean
g_file_set_attribute_byte_string (GFile
*file
,
794 const char *attribute
,
796 GFileQueryInfoFlags flags
,
797 GCancellable
*cancellable
,
799 gboolean
g_file_set_attribute_uint32 (GFile
*file
,
800 const char *attribute
,
802 GFileQueryInfoFlags flags
,
803 GCancellable
*cancellable
,
805 gboolean
g_file_set_attribute_int32 (GFile
*file
,
806 const char *attribute
,
808 GFileQueryInfoFlags flags
,
809 GCancellable
*cancellable
,
811 gboolean
g_file_set_attribute_uint64 (GFile
*file
,
812 const char *attribute
,
814 GFileQueryInfoFlags flags
,
815 GCancellable
*cancellable
,
817 gboolean
g_file_set_attribute_int64 (GFile
*file
,
818 const char *attribute
,
820 GFileQueryInfoFlags flags
,
821 GCancellable
*cancellable
,
823 void g_file_mount_enclosing_volume (GFile
*location
,
824 GMountMountFlags flags
,
825 GMountOperation
*mount_operation
,
826 GCancellable
*cancellable
,
827 GAsyncReadyCallback callback
,
829 gboolean
g_file_mount_enclosing_volume_finish (GFile
*location
,
830 GAsyncResult
*result
,
832 void g_file_mount_mountable (GFile
*file
,
833 GMountMountFlags flags
,
834 GMountOperation
*mount_operation
,
835 GCancellable
*cancellable
,
836 GAsyncReadyCallback callback
,
838 GFile
* g_file_mount_mountable_finish (GFile
*file
,
839 GAsyncResult
*result
,
841 void g_file_unmount_mountable (GFile
*file
,
842 GMountUnmountFlags flags
,
843 GCancellable
*cancellable
,
844 GAsyncReadyCallback callback
,
846 gboolean
g_file_unmount_mountable_finish (GFile
*file
,
847 GAsyncResult
*result
,
849 void g_file_eject_mountable (GFile
*file
,
850 GMountUnmountFlags flags
,
851 GCancellable
*cancellable
,
852 GAsyncReadyCallback callback
,
854 gboolean
g_file_eject_mountable_finish (GFile
*file
,
855 GAsyncResult
*result
,
858 gboolean
g_file_copy_attributes (GFile
*source
,
860 GFileCopyFlags flags
,
861 GCancellable
*cancellable
,
865 GFileMonitor
* g_file_monitor_directory (GFile
*file
,
866 GFileMonitorFlags flags
,
867 GCancellable
*cancellable
,
869 GFileMonitor
* g_file_monitor_file (GFile
*file
,
870 GFileMonitorFlags flags
,
871 GCancellable
*cancellable
,
877 GAppInfo
*g_file_query_default_handler (GFile
*file
,
878 GCancellable
*cancellable
,
880 gboolean
g_file_load_contents (GFile
*file
,
881 GCancellable
*cancellable
,
886 void g_file_load_contents_async (GFile
*file
,
887 GCancellable
*cancellable
,
888 GAsyncReadyCallback callback
,
890 gboolean
g_file_load_contents_finish (GFile
*file
,
896 void g_file_load_partial_contents_async (GFile
*file
,
897 GCancellable
*cancellable
,
898 GFileReadMoreCallback read_more_callback
,
899 GAsyncReadyCallback callback
,
901 gboolean
g_file_load_partial_contents_finish (GFile
*file
,
907 gboolean
g_file_replace_contents (GFile
*file
,
908 const char *contents
,
911 gboolean make_backup
,
912 GFileCreateFlags flags
,
914 GCancellable
*cancellable
,
916 void g_file_replace_contents_async (GFile
*file
,
917 const char *contents
,
920 gboolean make_backup
,
921 GFileCreateFlags flags
,
922 GCancellable
*cancellable
,
923 GAsyncReadyCallback callback
,
925 gboolean
g_file_replace_contents_finish (GFile
*file
,
932 #endif /* __G_FILE_H__ */