Add a GIcon implementation that can add an emblem to another icon.
[glib.git] / gio / gfile.h
blob58b29923e17b832645f5389624a664e062653282
1 /* GIO - GLib Input, Output and Streaming Library
2 *
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."
25 #endif
27 #ifndef __G_FILE_H__
28 #define __G_FILE_H__
30 #include <gio/giotypes.h>
32 G_BEGIN_DECLS
34 #define G_TYPE_FILE (g_file_get_type ())
35 #define G_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE, GFile))
36 #define G_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE))
37 #define G_FILE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE, GFileIface))
39 #if 0
40 /**
41 * GFile:
43 * A handle to an object implementing the #GFileIface interface.
44 * Generally stores a location within the file system. Handles do not
45 * necessarily represent files or directories that currently exist.
46 **/
47 typedef struct _GFile GFile; /* Dummy typedef */
48 #endif
49 typedef struct _GFileIface GFileIface;
52 /**
53 * GFileIface:
54 * @g_iface: The parent interface.
55 * @dup: Duplicates a #GFile.
56 * @hash: Creates a hash of a #GFile.
57 * @equal: Checks equality of two given #GFile<!-- -->s.
58 * @is_native: Checks to see if a file is native to the system.
59 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
60 * @get_uri_scheme: Gets the URI scheme for a #GFile.
61 * @get_basename: Gets the basename for a given #GFile.
62 * @get_path: Gets the current path within a #GFile.
63 * @get_uri: Gets a URI for the path within a #GFile.
64 * @get_parse_name: Gets the parsed name for the #GFile.
65 * @get_parent: Gets the parent directory for the #GFile.
66 * @prefix_matches: Checks whether a #GFile contains a specified file.
67 * @get_relative_path: Gets the path for a #GFile relative to a given path.
68 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
69 * @get_child_for_display_name: Gets the child #GFile for a given display name.
70 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
71 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
72 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
73 * @query_info: Gets the #GFileInfo for a #GFile.
74 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
75 * @query_info_finish: Finishes an asynchronous query info operation.
76 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
77 * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
78 * @query_filesystem_info_finish: Finishes asynchronously getting the file system info.
79 * @find_enclosing_mount: Gets a #GMount for the #GFile.
80 * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
81 * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
82 * @set_display_name: Sets the display name for a #GFile.
83 * @set_display_name_async: Asynchronously sets a #GFile's display name.
84 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
85 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
86 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
87 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
88 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
89 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
90 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
91 * @set_attribute: Sets a #GFileAttribute.
92 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
93 * @set_attributes_async: Asynchronously sets a file's attributes.
94 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
95 * @read_fn: Reads a file asynchronously.
96 * @read_async: Asynchronously reads a file.
97 * @read_finish: Finishes asynchronously reading a file.
98 * @append_to: Writes to the end of a file.
99 * @append_to_async: Asynchronously writes to the end of a file.
100 * @append_to_finish: Finishes an asynchronous file append operation.
101 * @create: Creates a new file.
102 * @create_async: Asynchronously creates a file.
103 * @create_finish: Finishes asynchronously creating a file.
104 * @replace: Replaces the contents of a file.
105 * @replace_async: Asynchronously replaces the contents of a file.
106 * @replace_finish: Finishes asynchronously replacing a file.
107 * @delete_file: Deletes a file.
108 * @_delete_file_async: Asynchronously deletes a file.
109 * @_delete_file_finish: Finishes an asynchronous delete.
110 * @trash: Sends a #GFile to the Trash location.
111 * @_trash_async: Asynchronously sends a #GFile to the Trash location.
112 * @_trash_finish: Finishes an asynchronous file trashing operation.
113 * @make_directory: Makes a directory.
114 * @_make_directory_async: Asynchronously makes a directory.
115 * @_make_directory_finish: Finishes making a directory asynchronously.
116 * @make_symbolic_link: Makes a symbolic link.
117 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
118 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
119 * @copy: Copies a file.
120 * @copy_async: Asynchronously copies a file.
121 * @copy_finish: Finishes an asynchronous copy operation.
122 * @move: Moves a file.
123 * @_move_async: Asynchronously moves a file.
124 * @_move_finish: Finishes an asynchronous move operation.
125 * @mount_mountable: Mounts a mountable object.
126 * @mount_mountable_finish: Finishes a mounting operation.
127 * @unmount_mountable: Unmounts a mountable object.
128 * @unmount_mountable_finish: Finishes an unmount operation.
129 * @eject_mountable: Ejects a mountable.
130 * @eject_mountable_finish: Finishes an eject operation.
131 * @mount_enclosing_volume: Mounts a specified location.
132 * @mount_enclosing_volume_finish: Finishes mounting a specified location.
133 * @monitor_dir: Creates a #GFileMonitor for the location.
134 * @monitor_file: Creates a #GFileMonitor for the location.
136 * An interface for writing VFS file handles.
137 **/
138 struct _GFileIface
140 GTypeInterface g_iface;
142 /* Virtual Table */
144 GFile * (*dup) (GFile *file);
145 guint (*hash) (GFile *file);
146 gboolean (*equal) (GFile *file1,
147 GFile *file2);
148 gboolean (*is_native) (GFile *file);
149 gboolean (*has_uri_scheme) (GFile *file,
150 const char *uri_scheme);
151 char * (*get_uri_scheme) (GFile *file);
152 char * (*get_basename) (GFile *file);
153 char * (*get_path) (GFile *file);
154 char * (*get_uri) (GFile *file);
155 char * (*get_parse_name) (GFile *file);
156 GFile * (*get_parent) (GFile *file);
157 gboolean (*prefix_matches) (GFile *prefix,
158 GFile *file);
159 char * (*get_relative_path) (GFile *parent,
160 GFile *descendant);
161 GFile * (*resolve_relative_path) (GFile *file,
162 const char *relative_path);
163 GFile * (*get_child_for_display_name) (GFile *file,
164 const char *display_name,
165 GError **error);
167 GFileEnumerator * (*enumerate_children) (GFile *file,
168 const char *attributes,
169 GFileQueryInfoFlags flags,
170 GCancellable *cancellable,
171 GError **error);
172 void (*enumerate_children_async) (GFile *file,
173 const char *attributes,
174 GFileQueryInfoFlags flags,
175 int io_priority,
176 GCancellable *cancellable,
177 GAsyncReadyCallback callback,
178 gpointer user_data);
179 GFileEnumerator * (*enumerate_children_finish) (GFile *file,
180 GAsyncResult *res,
181 GError **error);
183 GFileInfo * (*query_info) (GFile *file,
184 const char *attributes,
185 GFileQueryInfoFlags flags,
186 GCancellable *cancellable,
187 GError **error);
188 void (*query_info_async) (GFile *file,
189 const char *attributes,
190 GFileQueryInfoFlags flags,
191 int io_priority,
192 GCancellable *cancellable,
193 GAsyncReadyCallback callback,
194 gpointer user_data);
195 GFileInfo * (*query_info_finish) (GFile *file,
196 GAsyncResult *res,
197 GError **error);
199 GFileInfo * (*query_filesystem_info)(GFile *file,
200 const char *attributes,
201 GCancellable *cancellable,
202 GError **error);
203 void (*query_filesystem_info_async) (GFile *file,
204 const char *attributes,
205 int io_priority,
206 GCancellable *cancellable,
207 GAsyncReadyCallback callback,
208 gpointer user_data);
209 GFileInfo * (*query_filesystem_info_finish) (GFile *file,
210 GAsyncResult *res,
211 GError **error);
213 GMount * (*find_enclosing_mount)(GFile *file,
214 GCancellable *cancellable,
215 GError **error);
216 void (*find_enclosing_mount_async)(GFile *file,
217 int io_priority,
218 GCancellable *cancellable,
219 GAsyncReadyCallback callback,
220 gpointer user_data);
221 GMount * (*find_enclosing_mount_finish)(GFile *file,
222 GAsyncResult *res,
223 GError **error);
225 GFile * (*set_display_name) (GFile *file,
226 const char *display_name,
227 GCancellable *cancellable,
228 GError **error);
229 void (*set_display_name_async) (GFile *file,
230 const char *display_name,
231 int io_priority,
232 GCancellable *cancellable,
233 GAsyncReadyCallback callback,
234 gpointer user_data);
235 GFile * (*set_display_name_finish) (GFile *file,
236 GAsyncResult *res,
237 GError **error);
239 GFileAttributeInfoList * (*query_settable_attributes) (GFile *file,
240 GCancellable *cancellable,
241 GError **error);
242 void (*_query_settable_attributes_async) (void);
243 void (*_query_settable_attributes_finish) (void);
245 GFileAttributeInfoList * (*query_writable_namespaces) (GFile *file,
246 GCancellable *cancellable,
247 GError **error);
248 void (*_query_writable_namespaces_async) (void);
249 void (*_query_writable_namespaces_finish) (void);
251 gboolean (*set_attribute) (GFile *file,
252 const char *attribute,
253 GFileAttributeType type,
254 gpointer value_p,
255 GFileQueryInfoFlags flags,
256 GCancellable *cancellable,
257 GError **error);
258 gboolean (*set_attributes_from_info) (GFile *file,
259 GFileInfo *info,
260 GFileQueryInfoFlags flags,
261 GCancellable *cancellable,
262 GError **error);
263 void (*set_attributes_async) (GFile *file,
264 GFileInfo *info,
265 GFileQueryInfoFlags flags,
266 int io_priority,
267 GCancellable *cancellable,
268 GAsyncReadyCallback callback,
269 gpointer user_data);
270 gboolean (*set_attributes_finish) (GFile *file,
271 GAsyncResult *result,
272 GFileInfo **info,
273 GError **error);
275 GFileInputStream * (*read_fn) (GFile *file,
276 GCancellable *cancellable,
277 GError **error);
278 void (*read_async) (GFile *file,
279 int io_priority,
280 GCancellable *cancellable,
281 GAsyncReadyCallback callback,
282 gpointer user_data);
283 GFileInputStream * (*read_finish) (GFile *file,
284 GAsyncResult *res,
285 GError **error);
287 GFileOutputStream * (*append_to) (GFile *file,
288 GFileCreateFlags flags,
289 GCancellable *cancellable,
290 GError **error);
291 void (*append_to_async) (GFile *file,
292 GFileCreateFlags flags,
293 int io_priority,
294 GCancellable *cancellable,
295 GAsyncReadyCallback callback,
296 gpointer user_data);
297 GFileOutputStream * (*append_to_finish) (GFile *file,
298 GAsyncResult *res,
299 GError **error);
301 GFileOutputStream * (*create) (GFile *file,
302 GFileCreateFlags flags,
303 GCancellable *cancellable,
304 GError **error);
305 void (*create_async) (GFile *file,
306 GFileCreateFlags flags,
307 int io_priority,
308 GCancellable *cancellable,
309 GAsyncReadyCallback callback,
310 gpointer user_data);
311 GFileOutputStream * (*create_finish) (GFile *file,
312 GAsyncResult *res,
313 GError **error);
315 GFileOutputStream * (*replace) (GFile *file,
316 const char *etag,
317 gboolean make_backup,
318 GFileCreateFlags flags,
319 GCancellable *cancellable,
320 GError **error);
321 void (*replace_async) (GFile *file,
322 const char *etag,
323 gboolean make_backup,
324 GFileCreateFlags flags,
325 int io_priority,
326 GCancellable *cancellable,
327 GAsyncReadyCallback callback,
328 gpointer user_data);
329 GFileOutputStream * (*replace_finish) (GFile *file,
330 GAsyncResult *res,
331 GError **error);
333 gboolean (*delete_file) (GFile *file,
334 GCancellable *cancellable,
335 GError **error);
336 void (*_delete_file_async) (void);
337 void (*_delete_file_finish) (void);
339 gboolean (*trash) (GFile *file,
340 GCancellable *cancellable,
341 GError **error);
342 void (*_trash_async) (void);
343 void (*_trash_finish) (void);
345 gboolean (*make_directory) (GFile *file,
346 GCancellable *cancellable,
347 GError **error);
348 void (*_make_directory_async) (void);
349 void (*_make_directory_finish) (void);
351 gboolean (*make_symbolic_link) (GFile *file,
352 const char *symlink_value,
353 GCancellable *cancellable,
354 GError **error);
355 void (*_make_symbolic_link_async) (void);
356 void (*_make_symbolic_link_finish) (void);
358 gboolean (*copy) (GFile *source,
359 GFile *destination,
360 GFileCopyFlags flags,
361 GCancellable *cancellable,
362 GFileProgressCallback progress_callback,
363 gpointer progress_callback_data,
364 GError **error);
365 void (*copy_async) (GFile *source,
366 GFile *destination,
367 GFileCopyFlags flags,
368 int io_priority,
369 GCancellable *cancellable,
370 GFileProgressCallback progress_callback,
371 gpointer progress_callback_data,
372 GAsyncReadyCallback callback,
373 gpointer user_data);
374 gboolean (*copy_finish) (GFile *file,
375 GAsyncResult *res,
376 GError **error);
378 gboolean (*move) (GFile *source,
379 GFile *destination,
380 GFileCopyFlags flags,
381 GCancellable *cancellable,
382 GFileProgressCallback progress_callback,
383 gpointer progress_callback_data,
384 GError **error);
386 void (*_move_async) (void);
387 void (*_move_finish) (void);
390 void (*mount_mountable) (GFile *file,
391 GMountMountFlags flags,
392 GMountOperation *mount_operation,
393 GCancellable *cancellable,
394 GAsyncReadyCallback callback,
395 gpointer user_data);
396 GFile * (*mount_mountable_finish) (GFile *file,
397 GAsyncResult *result,
398 GError **error);
399 void (*unmount_mountable) (GFile *file,
400 GMountUnmountFlags flags,
401 GCancellable *cancellable,
402 GAsyncReadyCallback callback,
403 gpointer user_data);
404 gboolean (*unmount_mountable_finish) (GFile *file,
405 GAsyncResult *result,
406 GError **error);
407 void (*eject_mountable) (GFile *file,
408 GMountUnmountFlags flags,
409 GCancellable *cancellable,
410 GAsyncReadyCallback callback,
411 gpointer user_data);
412 gboolean (*eject_mountable_finish) (GFile *file,
413 GAsyncResult *result,
414 GError **error);
417 void (*mount_enclosing_volume) (GFile *location,
418 GMountMountFlags flags,
419 GMountOperation *mount_operation,
420 GCancellable *cancellable,
421 GAsyncReadyCallback callback,
422 gpointer user_data);
423 gboolean (*mount_enclosing_volume_finish) (GFile *location,
424 GAsyncResult *result,
425 GError **error);
427 GFileMonitor* (*monitor_dir) (GFile *file,
428 GFileMonitorFlags flags,
429 GCancellable *cancellable,
430 GError **error);
432 GFileMonitor* (*monitor_file) (GFile *file,
433 GFileMonitorFlags flags,
434 GCancellable *cancellable,
435 GError **error);
439 GType g_file_get_type (void) G_GNUC_CONST;
441 GFile * g_file_new_for_path (const char *path);
442 GFile * g_file_new_for_uri (const char *uri);
443 GFile * g_file_new_for_commandline_arg (const char *arg);
444 GFile * g_file_parse_name (const char *parse_name);
445 GFile * g_file_dup (GFile *file);
446 guint g_file_hash (gconstpointer file);
447 gboolean g_file_equal (GFile *file1,
448 GFile *file2);
449 char * g_file_get_basename (GFile *file);
450 char * g_file_get_path (GFile *file);
451 char * g_file_get_uri (GFile *file);
452 char * g_file_get_parse_name (GFile *file);
453 GFile * g_file_get_parent (GFile *file);
454 GFile * g_file_get_child (GFile *file,
455 const char *name);
456 GFile * g_file_get_child_for_display_name (GFile *file,
457 const char *display_name,
458 GError **error);
459 gboolean g_file_has_prefix (GFile *file,
460 GFile *prefix);
461 char * g_file_get_relative_path (GFile *parent,
462 GFile *descendant);
463 GFile * g_file_resolve_relative_path (GFile *file,
464 const char *relative_path);
465 gboolean g_file_is_native (GFile *file);
466 gboolean g_file_has_uri_scheme (GFile *file,
467 const char *uri_scheme);
468 char * g_file_get_uri_scheme (GFile *file);
469 GFileInputStream * g_file_read (GFile *file,
470 GCancellable *cancellable,
471 GError **error);
472 void g_file_read_async (GFile *file,
473 int io_priority,
474 GCancellable *cancellable,
475 GAsyncReadyCallback callback,
476 gpointer user_data);
477 GFileInputStream * g_file_read_finish (GFile *file,
478 GAsyncResult *res,
479 GError **error);
480 GFileOutputStream * g_file_append_to (GFile *file,
481 GFileCreateFlags flags,
482 GCancellable *cancellable,
483 GError **error);
484 GFileOutputStream * g_file_create (GFile *file,
485 GFileCreateFlags flags,
486 GCancellable *cancellable,
487 GError **error);
488 GFileOutputStream * g_file_replace (GFile *file,
489 const char *etag,
490 gboolean make_backup,
491 GFileCreateFlags flags,
492 GCancellable *cancellable,
493 GError **error);
494 void g_file_append_to_async (GFile *file,
495 GFileCreateFlags flags,
496 int io_priority,
497 GCancellable *cancellable,
498 GAsyncReadyCallback callback,
499 gpointer user_data);
500 GFileOutputStream * g_file_append_to_finish (GFile *file,
501 GAsyncResult *res,
502 GError **error);
503 void g_file_create_async (GFile *file,
504 GFileCreateFlags flags,
505 int io_priority,
506 GCancellable *cancellable,
507 GAsyncReadyCallback callback,
508 gpointer user_data);
509 GFileOutputStream * g_file_create_finish (GFile *file,
510 GAsyncResult *res,
511 GError **error);
512 void g_file_replace_async (GFile *file,
513 const char *etag,
514 gboolean make_backup,
515 GFileCreateFlags flags,
516 int io_priority,
517 GCancellable *cancellable,
518 GAsyncReadyCallback callback,
519 gpointer user_data);
520 GFileOutputStream * g_file_replace_finish (GFile *file,
521 GAsyncResult *res,
522 GError **error);
523 gboolean g_file_query_exists (GFile *file,
524 GCancellable *cancellable);
525 GFileType g_file_query_file_type (GFile *file,
526 GFileQueryInfoFlags flags,
527 GCancellable *cancellable);
528 GFileInfo * g_file_query_info (GFile *file,
529 const char *attributes,
530 GFileQueryInfoFlags flags,
531 GCancellable *cancellable,
532 GError **error);
533 void g_file_query_info_async (GFile *file,
534 const char *attributes,
535 GFileQueryInfoFlags flags,
536 int io_priority,
537 GCancellable *cancellable,
538 GAsyncReadyCallback callback,
539 gpointer user_data);
540 GFileInfo * g_file_query_info_finish (GFile *file,
541 GAsyncResult *res,
542 GError **error);
543 GFileInfo * g_file_query_filesystem_info (GFile *file,
544 const char *attributes,
545 GCancellable *cancellable,
546 GError **error);
547 void g_file_query_filesystem_info_async (GFile *file,
548 const char *attributes,
549 int io_priority,
550 GCancellable *cancellable,
551 GAsyncReadyCallback callback,
552 gpointer user_data);
553 GFileInfo * g_file_query_filesystem_info_finish (GFile *file,
554 GAsyncResult *res,
555 GError **error);
556 GMount * g_file_find_enclosing_mount (GFile *file,
557 GCancellable *cancellable,
558 GError **error);
559 void g_file_find_enclosing_mount_async (GFile *file,
560 int io_priority,
561 GCancellable *cancellable,
562 GAsyncReadyCallback callback,
563 gpointer user_data);
564 GMount * g_file_find_enclosing_mount_finish (GFile *file,
565 GAsyncResult *res,
566 GError **error);
567 GFileEnumerator * g_file_enumerate_children (GFile *file,
568 const char *attributes,
569 GFileQueryInfoFlags flags,
570 GCancellable *cancellable,
571 GError **error);
572 void g_file_enumerate_children_async (GFile *file,
573 const char *attributes,
574 GFileQueryInfoFlags flags,
575 int io_priority,
576 GCancellable *cancellable,
577 GAsyncReadyCallback callback,
578 gpointer user_data);
579 GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
580 GAsyncResult *res,
581 GError **error);
582 GFile * g_file_set_display_name (GFile *file,
583 const char *display_name,
584 GCancellable *cancellable,
585 GError **error);
586 void g_file_set_display_name_async (GFile *file,
587 const char *display_name,
588 int io_priority,
589 GCancellable *cancellable,
590 GAsyncReadyCallback callback,
591 gpointer user_data);
592 GFile * g_file_set_display_name_finish (GFile *file,
593 GAsyncResult *res,
594 GError **error);
595 gboolean g_file_delete (GFile *file,
596 GCancellable *cancellable,
597 GError **error);
598 gboolean g_file_trash (GFile *file,
599 GCancellable *cancellable,
600 GError **error);
601 gboolean g_file_copy (GFile *source,
602 GFile *destination,
603 GFileCopyFlags flags,
604 GCancellable *cancellable,
605 GFileProgressCallback progress_callback,
606 gpointer progress_callback_data,
607 GError **error);
608 void g_file_copy_async (GFile *source,
609 GFile *destination,
610 GFileCopyFlags flags,
611 int io_priority,
612 GCancellable *cancellable,
613 GFileProgressCallback progress_callback,
614 gpointer progress_callback_data,
615 GAsyncReadyCallback callback,
616 gpointer user_data);
617 gboolean g_file_copy_finish (GFile *file,
618 GAsyncResult *res,
619 GError **error);
620 gboolean g_file_move (GFile *source,
621 GFile *destination,
622 GFileCopyFlags flags,
623 GCancellable *cancellable,
624 GFileProgressCallback progress_callback,
625 gpointer progress_callback_data,
626 GError **error);
627 gboolean g_file_make_directory (GFile *file,
628 GCancellable *cancellable,
629 GError **error);
630 gboolean g_file_make_directory_with_parents (GFile *file,
631 GCancellable *cancellable,
632 GError **error);
633 gboolean g_file_make_symbolic_link (GFile *file,
634 const char *symlink_value,
635 GCancellable *cancellable,
636 GError **error);
637 GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
638 GCancellable *cancellable,
639 GError **error);
640 GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
641 GCancellable *cancellable,
642 GError **error);
643 gboolean g_file_set_attribute (GFile *file,
644 const char *attribute,
645 GFileAttributeType type,
646 gpointer value_p,
647 GFileQueryInfoFlags flags,
648 GCancellable *cancellable,
649 GError **error);
650 gboolean g_file_set_attributes_from_info (GFile *file,
651 GFileInfo *info,
652 GFileQueryInfoFlags flags,
653 GCancellable *cancellable,
654 GError **error);
655 void g_file_set_attributes_async (GFile *file,
656 GFileInfo *info,
657 GFileQueryInfoFlags flags,
658 int io_priority,
659 GCancellable *cancellable,
660 GAsyncReadyCallback callback,
661 gpointer user_data);
662 gboolean g_file_set_attributes_finish (GFile *file,
663 GAsyncResult *result,
664 GFileInfo **info,
665 GError **error);
666 gboolean g_file_set_attribute_string (GFile *file,
667 const char *attribute,
668 const char *value,
669 GFileQueryInfoFlags flags,
670 GCancellable *cancellable,
671 GError **error);
672 gboolean g_file_set_attribute_byte_string (GFile *file,
673 const char *attribute,
674 const char *value,
675 GFileQueryInfoFlags flags,
676 GCancellable *cancellable,
677 GError **error);
678 gboolean g_file_set_attribute_uint32 (GFile *file,
679 const char *attribute,
680 guint32 value,
681 GFileQueryInfoFlags flags,
682 GCancellable *cancellable,
683 GError **error);
684 gboolean g_file_set_attribute_int32 (GFile *file,
685 const char *attribute,
686 gint32 value,
687 GFileQueryInfoFlags flags,
688 GCancellable *cancellable,
689 GError **error);
690 gboolean g_file_set_attribute_uint64 (GFile *file,
691 const char *attribute,
692 guint64 value,
693 GFileQueryInfoFlags flags,
694 GCancellable *cancellable,
695 GError **error);
696 gboolean g_file_set_attribute_int64 (GFile *file,
697 const char *attribute,
698 gint64 value,
699 GFileQueryInfoFlags flags,
700 GCancellable *cancellable,
701 GError **error);
702 void g_file_mount_enclosing_volume (GFile *location,
703 GMountMountFlags flags,
704 GMountOperation *mount_operation,
705 GCancellable *cancellable,
706 GAsyncReadyCallback callback,
707 gpointer user_data);
708 gboolean g_file_mount_enclosing_volume_finish (GFile *location,
709 GAsyncResult *result,
710 GError **error);
711 void g_file_mount_mountable (GFile *file,
712 GMountMountFlags flags,
713 GMountOperation *mount_operation,
714 GCancellable *cancellable,
715 GAsyncReadyCallback callback,
716 gpointer user_data);
717 GFile * g_file_mount_mountable_finish (GFile *file,
718 GAsyncResult *result,
719 GError **error);
720 void g_file_unmount_mountable (GFile *file,
721 GMountUnmountFlags flags,
722 GCancellable *cancellable,
723 GAsyncReadyCallback callback,
724 gpointer user_data);
725 gboolean g_file_unmount_mountable_finish (GFile *file,
726 GAsyncResult *result,
727 GError **error);
728 void g_file_eject_mountable (GFile *file,
729 GMountUnmountFlags flags,
730 GCancellable *cancellable,
731 GAsyncReadyCallback callback,
732 gpointer user_data);
733 gboolean g_file_eject_mountable_finish (GFile *file,
734 GAsyncResult *result,
735 GError **error);
737 gboolean g_file_copy_attributes (GFile *source,
738 GFile *destination,
739 GFileCopyFlags flags,
740 GCancellable *cancellable,
741 GError **error);
744 GFileMonitor* g_file_monitor_directory (GFile *file,
745 GFileMonitorFlags flags,
746 GCancellable *cancellable,
747 GError **error);
748 GFileMonitor* g_file_monitor_file (GFile *file,
749 GFileMonitorFlags flags,
750 GCancellable *cancellable,
751 GError **error);
752 GFileMonitor* g_file_monitor (GFile *file,
753 GFileMonitorFlags flags,
754 GCancellable *cancellable,
755 GError **error);
758 /* Utilities */
760 GAppInfo *g_file_query_default_handler (GFile *file,
761 GCancellable *cancellable,
762 GError **error);
763 gboolean g_file_load_contents (GFile *file,
764 GCancellable *cancellable,
765 char **contents,
766 gsize *length,
767 char **etag_out,
768 GError **error);
769 void g_file_load_contents_async (GFile *file,
770 GCancellable *cancellable,
771 GAsyncReadyCallback callback,
772 gpointer user_data);
773 gboolean g_file_load_contents_finish (GFile *file,
774 GAsyncResult *res,
775 char **contents,
776 gsize *length,
777 char **etag_out,
778 GError **error);
779 void g_file_load_partial_contents_async (GFile *file,
780 GCancellable *cancellable,
781 GFileReadMoreCallback read_more_callback,
782 GAsyncReadyCallback callback,
783 gpointer user_data);
784 gboolean g_file_load_partial_contents_finish (GFile *file,
785 GAsyncResult *res,
786 char **contents,
787 gsize *length,
788 char **etag_out,
789 GError **error);
790 gboolean g_file_replace_contents (GFile *file,
791 const char *contents,
792 gsize length,
793 const char *etag,
794 gboolean make_backup,
795 GFileCreateFlags flags,
796 char **new_etag,
797 GCancellable *cancellable,
798 GError **error);
799 void g_file_replace_contents_async (GFile *file,
800 const char *contents,
801 gsize length,
802 const char *etag,
803 gboolean make_backup,
804 GFileCreateFlags flags,
805 GCancellable *cancellable,
806 GAsyncReadyCallback callback,
807 gpointer user_data);
808 gboolean g_file_replace_contents_finish (GFile *file,
809 GAsyncResult *res,
810 char **new_etag,
811 GError **error);
813 G_END_DECLS
815 #endif /* __G_FILE_H__ */