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 <gio/giotypes.h>
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))
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.
47 typedef struct _GFile GFile
; /* Dummy typedef */
49 typedef struct _GFileIface 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.
135 * @open_readwrite: Open file read/write. Since 2.22.
136 * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22.
137 * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22.
138 * @create_readwrite: Creates file read/write. Since 2.22.
139 * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22.
140 * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22.
141 * @replace_readwrite: Replaces file read/write. Since 2.22.
142 * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22.
143 * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22.
144 * @start_mountable: Starts a mountable object. Since 2.22.
145 * @start_mountable_finish: Finishes an start operation. Since 2.22.
146 * @stop_mountable: Stops a mountable. Since 2.22.
147 * @stop_mountable_finish: Finishes an stop operation. Since 2.22.
148 * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22.
149 * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22.
150 * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22.
151 * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22.
152 * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
153 * @poll_mountable: Polls a mountable object for media changes. Since 2.22.
154 * @poll_mountable_finish: Finishes an poll operation for media changes. Since 2.22.
156 * An interface for writing VFS file handles.
160 GTypeInterface g_iface
;
164 GFile
* (* dup
) (GFile
*file
);
165 guint (* hash
) (GFile
*file
);
166 gboolean (* equal
) (GFile
*file1
,
168 gboolean (* is_native
) (GFile
*file
);
169 gboolean (* has_uri_scheme
) (GFile
*file
,
170 const char *uri_scheme
);
171 char * (* get_uri_scheme
) (GFile
*file
);
172 char * (* get_basename
) (GFile
*file
);
173 char * (* get_path
) (GFile
*file
);
174 char * (* get_uri
) (GFile
*file
);
175 char * (* get_parse_name
) (GFile
*file
);
176 GFile
* (* get_parent
) (GFile
*file
);
177 gboolean (* prefix_matches
) (GFile
*prefix
,
179 char * (* get_relative_path
) (GFile
*parent
,
181 GFile
* (* resolve_relative_path
) (GFile
*file
,
182 const char *relative_path
);
183 GFile
* (* get_child_for_display_name
) (GFile
*file
,
184 const char *display_name
,
187 GFileEnumerator
* (* enumerate_children
) (GFile
*file
,
188 const char *attributes
,
189 GFileQueryInfoFlags flags
,
190 GCancellable
*cancellable
,
192 void (* enumerate_children_async
) (GFile
*file
,
193 const char *attributes
,
194 GFileQueryInfoFlags flags
,
196 GCancellable
*cancellable
,
197 GAsyncReadyCallback callback
,
199 GFileEnumerator
* (* enumerate_children_finish
) (GFile
*file
,
203 GFileInfo
* (* query_info
) (GFile
*file
,
204 const char *attributes
,
205 GFileQueryInfoFlags flags
,
206 GCancellable
*cancellable
,
208 void (* query_info_async
) (GFile
*file
,
209 const char *attributes
,
210 GFileQueryInfoFlags flags
,
212 GCancellable
*cancellable
,
213 GAsyncReadyCallback callback
,
215 GFileInfo
* (* query_info_finish
) (GFile
*file
,
219 GFileInfo
* (* query_filesystem_info
) (GFile
*file
,
220 const char *attributes
,
221 GCancellable
*cancellable
,
223 void (* query_filesystem_info_async
) (GFile
*file
,
224 const char *attributes
,
226 GCancellable
*cancellable
,
227 GAsyncReadyCallback callback
,
229 GFileInfo
* (* query_filesystem_info_finish
)(GFile
*file
,
233 GMount
* (* find_enclosing_mount
) (GFile
*file
,
234 GCancellable
*cancellable
,
236 void (* find_enclosing_mount_async
) (GFile
*file
,
238 GCancellable
*cancellable
,
239 GAsyncReadyCallback callback
,
241 GMount
* (* find_enclosing_mount_finish
) (GFile
*file
,
245 GFile
* (* set_display_name
) (GFile
*file
,
246 const char *display_name
,
247 GCancellable
*cancellable
,
249 void (* set_display_name_async
) (GFile
*file
,
250 const char *display_name
,
252 GCancellable
*cancellable
,
253 GAsyncReadyCallback callback
,
255 GFile
* (* set_display_name_finish
) (GFile
*file
,
259 GFileAttributeInfoList
* (* query_settable_attributes
) (GFile
*file
,
260 GCancellable
*cancellable
,
262 void (* _query_settable_attributes_async
) (void);
263 void (* _query_settable_attributes_finish
) (void);
265 GFileAttributeInfoList
* (* query_writable_namespaces
) (GFile
*file
,
266 GCancellable
*cancellable
,
268 void (* _query_writable_namespaces_async
) (void);
269 void (* _query_writable_namespaces_finish
) (void);
271 gboolean (* set_attribute
) (GFile
*file
,
272 const char *attribute
,
273 GFileAttributeType type
,
275 GFileQueryInfoFlags flags
,
276 GCancellable
*cancellable
,
278 gboolean (* set_attributes_from_info
) (GFile
*file
,
280 GFileQueryInfoFlags flags
,
281 GCancellable
*cancellable
,
283 void (* set_attributes_async
) (GFile
*file
,
285 GFileQueryInfoFlags flags
,
287 GCancellable
*cancellable
,
288 GAsyncReadyCallback callback
,
290 gboolean (* set_attributes_finish
) (GFile
*file
,
291 GAsyncResult
*result
,
295 GFileInputStream
* (* read_fn
) (GFile
*file
,
296 GCancellable
*cancellable
,
298 void (* read_async
) (GFile
*file
,
300 GCancellable
*cancellable
,
301 GAsyncReadyCallback callback
,
303 GFileInputStream
* (* read_finish
) (GFile
*file
,
307 GFileOutputStream
* (* append_to
) (GFile
*file
,
308 GFileCreateFlags flags
,
309 GCancellable
*cancellable
,
311 void (* append_to_async
) (GFile
*file
,
312 GFileCreateFlags flags
,
314 GCancellable
*cancellable
,
315 GAsyncReadyCallback callback
,
317 GFileOutputStream
* (* append_to_finish
) (GFile
*file
,
321 GFileOutputStream
* (* create
) (GFile
*file
,
322 GFileCreateFlags flags
,
323 GCancellable
*cancellable
,
325 void (* create_async
) (GFile
*file
,
326 GFileCreateFlags flags
,
328 GCancellable
*cancellable
,
329 GAsyncReadyCallback callback
,
331 GFileOutputStream
* (* create_finish
) (GFile
*file
,
335 GFileOutputStream
* (* replace
) (GFile
*file
,
337 gboolean make_backup
,
338 GFileCreateFlags flags
,
339 GCancellable
*cancellable
,
341 void (* replace_async
) (GFile
*file
,
343 gboolean make_backup
,
344 GFileCreateFlags flags
,
346 GCancellable
*cancellable
,
347 GAsyncReadyCallback callback
,
349 GFileOutputStream
* (* replace_finish
) (GFile
*file
,
353 gboolean (* delete_file
) (GFile
*file
,
354 GCancellable
*cancellable
,
356 void (* _delete_file_async
) (void);
357 void (* _delete_file_finish
) (void);
359 gboolean (* trash
) (GFile
*file
,
360 GCancellable
*cancellable
,
362 void (* _trash_async
) (void);
363 void (* _trash_finish
) (void);
365 gboolean (* make_directory
) (GFile
*file
,
366 GCancellable
*cancellable
,
368 void (* _make_directory_async
) (void);
369 void (* _make_directory_finish
) (void);
371 gboolean (* make_symbolic_link
) (GFile
*file
,
372 const char *symlink_value
,
373 GCancellable
*cancellable
,
375 void (* _make_symbolic_link_async
) (void);
376 void (* _make_symbolic_link_finish
) (void);
378 gboolean (* copy
) (GFile
*source
,
380 GFileCopyFlags flags
,
381 GCancellable
*cancellable
,
382 GFileProgressCallback progress_callback
,
383 gpointer progress_callback_data
,
385 void (* copy_async
) (GFile
*source
,
387 GFileCopyFlags flags
,
389 GCancellable
*cancellable
,
390 GFileProgressCallback progress_callback
,
391 gpointer progress_callback_data
,
392 GAsyncReadyCallback callback
,
394 gboolean (* copy_finish
) (GFile
*file
,
398 gboolean (* move
) (GFile
*source
,
400 GFileCopyFlags flags
,
401 GCancellable
*cancellable
,
402 GFileProgressCallback progress_callback
,
403 gpointer progress_callback_data
,
405 void (* _move_async
) (void);
406 void (* _move_finish
) (void);
408 void (* mount_mountable
) (GFile
*file
,
409 GMountMountFlags flags
,
410 GMountOperation
*mount_operation
,
411 GCancellable
*cancellable
,
412 GAsyncReadyCallback callback
,
414 GFile
* (* mount_mountable_finish
) (GFile
*file
,
415 GAsyncResult
*result
,
418 void (* unmount_mountable
) (GFile
*file
,
419 GMountUnmountFlags flags
,
420 GCancellable
*cancellable
,
421 GAsyncReadyCallback callback
,
423 gboolean (* unmount_mountable_finish
) (GFile
*file
,
424 GAsyncResult
*result
,
427 void (* eject_mountable
) (GFile
*file
,
428 GMountUnmountFlags flags
,
429 GCancellable
*cancellable
,
430 GAsyncReadyCallback callback
,
432 gboolean (* eject_mountable_finish
) (GFile
*file
,
433 GAsyncResult
*result
,
436 void (* mount_enclosing_volume
) (GFile
*location
,
437 GMountMountFlags flags
,
438 GMountOperation
*mount_operation
,
439 GCancellable
*cancellable
,
440 GAsyncReadyCallback callback
,
442 gboolean (* mount_enclosing_volume_finish
) (GFile
*location
,
443 GAsyncResult
*result
,
446 GFileMonitor
* (* monitor_dir
) (GFile
*file
,
447 GFileMonitorFlags flags
,
448 GCancellable
*cancellable
,
450 GFileMonitor
* (* monitor_file
) (GFile
*file
,
451 GFileMonitorFlags flags
,
452 GCancellable
*cancellable
,
455 GFileIOStream
* (* open_readwrite
) (GFile
*file
,
456 GCancellable
*cancellable
,
458 void (* open_readwrite_async
) (GFile
*file
,
460 GCancellable
*cancellable
,
461 GAsyncReadyCallback callback
,
463 GFileIOStream
* (* open_readwrite_finish
) (GFile
*file
,
466 GFileIOStream
* (* create_readwrite
) (GFile
*file
,
467 GFileCreateFlags flags
,
468 GCancellable
*cancellable
,
470 void (* create_readwrite_async
) (GFile
*file
,
471 GFileCreateFlags flags
,
473 GCancellable
*cancellable
,
474 GAsyncReadyCallback callback
,
476 GFileIOStream
* (* create_readwrite_finish
) (GFile
*file
,
479 GFileIOStream
* (* replace_readwrite
) (GFile
*file
,
481 gboolean make_backup
,
482 GFileCreateFlags flags
,
483 GCancellable
*cancellable
,
485 void (* replace_readwrite_async
) (GFile
*file
,
487 gboolean make_backup
,
488 GFileCreateFlags flags
,
490 GCancellable
*cancellable
,
491 GAsyncReadyCallback callback
,
493 GFileIOStream
* (* replace_readwrite_finish
) (GFile
*file
,
497 void (* start_mountable
) (GFile
*file
,
498 GDriveStartFlags flags
,
499 GMountOperation
*start_operation
,
500 GCancellable
*cancellable
,
501 GAsyncReadyCallback callback
,
503 gboolean (* start_mountable_finish
) (GFile
*file
,
504 GAsyncResult
*result
,
507 void (* stop_mountable
) (GFile
*file
,
508 GMountUnmountFlags flags
,
509 GMountOperation
*mount_operation
,
510 GCancellable
*cancellable
,
511 GAsyncReadyCallback callback
,
513 gboolean (* stop_mountable_finish
) (GFile
*file
,
514 GAsyncResult
*result
,
517 gboolean supports_thread_contexts
;
519 void (* unmount_mountable_with_operation
) (GFile
*file
,
520 GMountUnmountFlags flags
,
521 GMountOperation
*mount_operation
,
522 GCancellable
*cancellable
,
523 GAsyncReadyCallback callback
,
525 gboolean (* unmount_mountable_with_operation_finish
) (GFile
*file
,
526 GAsyncResult
*result
,
529 void (* eject_mountable_with_operation
) (GFile
*file
,
530 GMountUnmountFlags flags
,
531 GMountOperation
*mount_operation
,
532 GCancellable
*cancellable
,
533 GAsyncReadyCallback callback
,
535 gboolean (* eject_mountable_with_operation_finish
) (GFile
*file
,
536 GAsyncResult
*result
,
539 void (* poll_mountable
) (GFile
*file
,
540 GCancellable
*cancellable
,
541 GAsyncReadyCallback callback
,
543 gboolean (* poll_mountable_finish
) (GFile
*file
,
544 GAsyncResult
*result
,
548 GType
g_file_get_type (void) G_GNUC_CONST
;
550 GFile
* g_file_new_for_path (const char *path
);
551 GFile
* g_file_new_for_uri (const char *uri
);
552 GFile
* g_file_new_for_commandline_arg (const char *arg
);
553 GFile
* g_file_parse_name (const char *parse_name
);
554 GFile
* g_file_dup (GFile
*file
);
555 guint
g_file_hash (gconstpointer file
);
556 gboolean
g_file_equal (GFile
*file1
,
558 char * g_file_get_basename (GFile
*file
);
559 char * g_file_get_path (GFile
*file
);
560 char * g_file_get_uri (GFile
*file
);
561 char * g_file_get_parse_name (GFile
*file
);
562 GFile
* g_file_get_parent (GFile
*file
);
563 GFile
* g_file_get_child (GFile
*file
,
565 GFile
* g_file_get_child_for_display_name (GFile
*file
,
566 const char *display_name
,
568 gboolean
g_file_has_prefix (GFile
*file
,
570 char * g_file_get_relative_path (GFile
*parent
,
572 GFile
* g_file_resolve_relative_path (GFile
*file
,
573 const char *relative_path
);
574 gboolean
g_file_is_native (GFile
*file
);
575 gboolean
g_file_has_uri_scheme (GFile
*file
,
576 const char *uri_scheme
);
577 char * g_file_get_uri_scheme (GFile
*file
);
578 GFileInputStream
* g_file_read (GFile
*file
,
579 GCancellable
*cancellable
,
581 void g_file_read_async (GFile
*file
,
583 GCancellable
*cancellable
,
584 GAsyncReadyCallback callback
,
586 GFileInputStream
* g_file_read_finish (GFile
*file
,
589 GFileOutputStream
* g_file_append_to (GFile
*file
,
590 GFileCreateFlags flags
,
591 GCancellable
*cancellable
,
593 GFileOutputStream
* g_file_create (GFile
*file
,
594 GFileCreateFlags flags
,
595 GCancellable
*cancellable
,
597 GFileOutputStream
* g_file_replace (GFile
*file
,
599 gboolean make_backup
,
600 GFileCreateFlags flags
,
601 GCancellable
*cancellable
,
603 void g_file_append_to_async (GFile
*file
,
604 GFileCreateFlags flags
,
606 GCancellable
*cancellable
,
607 GAsyncReadyCallback callback
,
609 GFileOutputStream
* g_file_append_to_finish (GFile
*file
,
612 void g_file_create_async (GFile
*file
,
613 GFileCreateFlags flags
,
615 GCancellable
*cancellable
,
616 GAsyncReadyCallback callback
,
618 GFileOutputStream
* g_file_create_finish (GFile
*file
,
621 void g_file_replace_async (GFile
*file
,
623 gboolean make_backup
,
624 GFileCreateFlags flags
,
626 GCancellable
*cancellable
,
627 GAsyncReadyCallback callback
,
629 GFileOutputStream
* g_file_replace_finish (GFile
*file
,
632 GFileIOStream
* g_file_open_readwrite (GFile
*file
,
633 GCancellable
*cancellable
,
635 void g_file_open_readwrite_async (GFile
*file
,
637 GCancellable
*cancellable
,
638 GAsyncReadyCallback callback
,
640 GFileIOStream
* g_file_open_readwrite_finish (GFile
*file
,
643 GFileIOStream
* g_file_create_readwrite (GFile
*file
,
644 GFileCreateFlags flags
,
645 GCancellable
*cancellable
,
647 void g_file_create_readwrite_async (GFile
*file
,
648 GFileCreateFlags flags
,
650 GCancellable
*cancellable
,
651 GAsyncReadyCallback callback
,
653 GFileIOStream
* g_file_create_readwrite_finish (GFile
*file
,
656 GFileIOStream
* g_file_replace_readwrite (GFile
*file
,
658 gboolean make_backup
,
659 GFileCreateFlags flags
,
660 GCancellable
*cancellable
,
662 void g_file_replace_readwrite_async (GFile
*file
,
664 gboolean make_backup
,
665 GFileCreateFlags flags
,
667 GCancellable
*cancellable
,
668 GAsyncReadyCallback callback
,
670 GFileIOStream
* g_file_replace_readwrite_finish (GFile
*file
,
673 gboolean
g_file_query_exists (GFile
*file
,
674 GCancellable
*cancellable
);
675 GFileType
g_file_query_file_type (GFile
*file
,
676 GFileQueryInfoFlags flags
,
677 GCancellable
*cancellable
);
678 GFileInfo
* g_file_query_info (GFile
*file
,
679 const char *attributes
,
680 GFileQueryInfoFlags flags
,
681 GCancellable
*cancellable
,
683 void g_file_query_info_async (GFile
*file
,
684 const char *attributes
,
685 GFileQueryInfoFlags flags
,
687 GCancellable
*cancellable
,
688 GAsyncReadyCallback callback
,
690 GFileInfo
* g_file_query_info_finish (GFile
*file
,
693 GFileInfo
* g_file_query_filesystem_info (GFile
*file
,
694 const char *attributes
,
695 GCancellable
*cancellable
,
697 void g_file_query_filesystem_info_async (GFile
*file
,
698 const char *attributes
,
700 GCancellable
*cancellable
,
701 GAsyncReadyCallback callback
,
703 GFileInfo
* g_file_query_filesystem_info_finish (GFile
*file
,
706 GMount
* g_file_find_enclosing_mount (GFile
*file
,
707 GCancellable
*cancellable
,
709 void g_file_find_enclosing_mount_async (GFile
*file
,
711 GCancellable
*cancellable
,
712 GAsyncReadyCallback callback
,
714 GMount
* g_file_find_enclosing_mount_finish (GFile
*file
,
717 GFileEnumerator
* g_file_enumerate_children (GFile
*file
,
718 const char *attributes
,
719 GFileQueryInfoFlags flags
,
720 GCancellable
*cancellable
,
722 void g_file_enumerate_children_async (GFile
*file
,
723 const char *attributes
,
724 GFileQueryInfoFlags flags
,
726 GCancellable
*cancellable
,
727 GAsyncReadyCallback callback
,
729 GFileEnumerator
* g_file_enumerate_children_finish (GFile
*file
,
732 GFile
* g_file_set_display_name (GFile
*file
,
733 const char *display_name
,
734 GCancellable
*cancellable
,
736 void g_file_set_display_name_async (GFile
*file
,
737 const char *display_name
,
739 GCancellable
*cancellable
,
740 GAsyncReadyCallback callback
,
742 GFile
* g_file_set_display_name_finish (GFile
*file
,
745 gboolean
g_file_delete (GFile
*file
,
746 GCancellable
*cancellable
,
748 gboolean
g_file_trash (GFile
*file
,
749 GCancellable
*cancellable
,
751 gboolean
g_file_copy (GFile
*source
,
753 GFileCopyFlags flags
,
754 GCancellable
*cancellable
,
755 GFileProgressCallback progress_callback
,
756 gpointer progress_callback_data
,
758 void g_file_copy_async (GFile
*source
,
760 GFileCopyFlags flags
,
762 GCancellable
*cancellable
,
763 GFileProgressCallback progress_callback
,
764 gpointer progress_callback_data
,
765 GAsyncReadyCallback callback
,
767 gboolean
g_file_copy_finish (GFile
*file
,
770 gboolean
g_file_move (GFile
*source
,
772 GFileCopyFlags flags
,
773 GCancellable
*cancellable
,
774 GFileProgressCallback progress_callback
,
775 gpointer progress_callback_data
,
777 gboolean
g_file_make_directory (GFile
*file
,
778 GCancellable
*cancellable
,
780 gboolean
g_file_make_directory_with_parents (GFile
*file
,
781 GCancellable
*cancellable
,
783 gboolean
g_file_make_symbolic_link (GFile
*file
,
784 const char *symlink_value
,
785 GCancellable
*cancellable
,
787 GFileAttributeInfoList
*g_file_query_settable_attributes (GFile
*file
,
788 GCancellable
*cancellable
,
790 GFileAttributeInfoList
*g_file_query_writable_namespaces (GFile
*file
,
791 GCancellable
*cancellable
,
793 gboolean
g_file_set_attribute (GFile
*file
,
794 const char *attribute
,
795 GFileAttributeType type
,
797 GFileQueryInfoFlags flags
,
798 GCancellable
*cancellable
,
800 gboolean
g_file_set_attributes_from_info (GFile
*file
,
802 GFileQueryInfoFlags flags
,
803 GCancellable
*cancellable
,
805 void g_file_set_attributes_async (GFile
*file
,
807 GFileQueryInfoFlags flags
,
809 GCancellable
*cancellable
,
810 GAsyncReadyCallback callback
,
812 gboolean
g_file_set_attributes_finish (GFile
*file
,
813 GAsyncResult
*result
,
816 gboolean
g_file_set_attribute_string (GFile
*file
,
817 const char *attribute
,
819 GFileQueryInfoFlags flags
,
820 GCancellable
*cancellable
,
822 gboolean
g_file_set_attribute_byte_string (GFile
*file
,
823 const char *attribute
,
825 GFileQueryInfoFlags flags
,
826 GCancellable
*cancellable
,
828 gboolean
g_file_set_attribute_uint32 (GFile
*file
,
829 const char *attribute
,
831 GFileQueryInfoFlags flags
,
832 GCancellable
*cancellable
,
834 gboolean
g_file_set_attribute_int32 (GFile
*file
,
835 const char *attribute
,
837 GFileQueryInfoFlags flags
,
838 GCancellable
*cancellable
,
840 gboolean
g_file_set_attribute_uint64 (GFile
*file
,
841 const char *attribute
,
843 GFileQueryInfoFlags flags
,
844 GCancellable
*cancellable
,
846 gboolean
g_file_set_attribute_int64 (GFile
*file
,
847 const char *attribute
,
849 GFileQueryInfoFlags flags
,
850 GCancellable
*cancellable
,
852 void g_file_mount_enclosing_volume (GFile
*location
,
853 GMountMountFlags flags
,
854 GMountOperation
*mount_operation
,
855 GCancellable
*cancellable
,
856 GAsyncReadyCallback callback
,
858 gboolean
g_file_mount_enclosing_volume_finish (GFile
*location
,
859 GAsyncResult
*result
,
861 void g_file_mount_mountable (GFile
*file
,
862 GMountMountFlags flags
,
863 GMountOperation
*mount_operation
,
864 GCancellable
*cancellable
,
865 GAsyncReadyCallback callback
,
867 GFile
* g_file_mount_mountable_finish (GFile
*file
,
868 GAsyncResult
*result
,
870 #ifndef G_DISABLE_DEPRECATED
871 void g_file_unmount_mountable (GFile
*file
,
872 GMountUnmountFlags flags
,
873 GCancellable
*cancellable
,
874 GAsyncReadyCallback callback
,
876 gboolean
g_file_unmount_mountable_finish (GFile
*file
,
877 GAsyncResult
*result
,
880 void g_file_unmount_mountable_with_operation (GFile
*file
,
881 GMountUnmountFlags flags
,
882 GMountOperation
*mount_operation
,
883 GCancellable
*cancellable
,
884 GAsyncReadyCallback callback
,
886 gboolean
g_file_unmount_mountable_with_operation_finish (GFile
*file
,
887 GAsyncResult
*result
,
889 #ifndef G_DISABLE_DEPRECATED
890 void g_file_eject_mountable (GFile
*file
,
891 GMountUnmountFlags flags
,
892 GCancellable
*cancellable
,
893 GAsyncReadyCallback callback
,
895 gboolean
g_file_eject_mountable_finish (GFile
*file
,
896 GAsyncResult
*result
,
899 void g_file_eject_mountable_with_operation (GFile
*file
,
900 GMountUnmountFlags flags
,
901 GMountOperation
*mount_operation
,
902 GCancellable
*cancellable
,
903 GAsyncReadyCallback callback
,
905 gboolean
g_file_eject_mountable_with_operation_finish (GFile
*file
,
906 GAsyncResult
*result
,
909 gboolean
g_file_copy_attributes (GFile
*source
,
911 GFileCopyFlags flags
,
912 GCancellable
*cancellable
,
916 GFileMonitor
* g_file_monitor_directory (GFile
*file
,
917 GFileMonitorFlags flags
,
918 GCancellable
*cancellable
,
920 GFileMonitor
* g_file_monitor_file (GFile
*file
,
921 GFileMonitorFlags flags
,
922 GCancellable
*cancellable
,
924 GFileMonitor
* g_file_monitor (GFile
*file
,
925 GFileMonitorFlags flags
,
926 GCancellable
*cancellable
,
929 void g_file_start_mountable (GFile
*file
,
930 GDriveStartFlags flags
,
931 GMountOperation
*start_operation
,
932 GCancellable
*cancellable
,
933 GAsyncReadyCallback callback
,
935 gboolean
g_file_start_mountable_finish (GFile
*file
,
936 GAsyncResult
*result
,
938 void g_file_stop_mountable (GFile
*file
,
939 GMountUnmountFlags flags
,
940 GMountOperation
*mount_operation
,
941 GCancellable
*cancellable
,
942 GAsyncReadyCallback callback
,
944 gboolean
g_file_stop_mountable_finish (GFile
*file
,
945 GAsyncResult
*result
,
948 void g_file_poll_mountable (GFile
*file
,
949 GCancellable
*cancellable
,
950 GAsyncReadyCallback callback
,
952 gboolean
g_file_poll_mountable_finish (GFile
*file
,
953 GAsyncResult
*result
,
958 GAppInfo
*g_file_query_default_handler (GFile
*file
,
959 GCancellable
*cancellable
,
961 gboolean
g_file_load_contents (GFile
*file
,
962 GCancellable
*cancellable
,
967 void g_file_load_contents_async (GFile
*file
,
968 GCancellable
*cancellable
,
969 GAsyncReadyCallback callback
,
971 gboolean
g_file_load_contents_finish (GFile
*file
,
977 void g_file_load_partial_contents_async (GFile
*file
,
978 GCancellable
*cancellable
,
979 GFileReadMoreCallback read_more_callback
,
980 GAsyncReadyCallback callback
,
982 gboolean
g_file_load_partial_contents_finish (GFile
*file
,
988 gboolean
g_file_replace_contents (GFile
*file
,
989 const char *contents
,
992 gboolean make_backup
,
993 GFileCreateFlags flags
,
995 GCancellable
*cancellable
,
997 void g_file_replace_contents_async (GFile
*file
,
998 const char *contents
,
1001 gboolean make_backup
,
1002 GFileCreateFlags flags
,
1003 GCancellable
*cancellable
,
1004 GAsyncReadyCallback callback
,
1005 gpointer user_data
);
1006 gboolean
g_file_replace_contents_finish (GFile
*file
,
1011 gboolean
g_file_supports_thread_contexts (GFile
*file
);
1015 #endif /* __G_FILE_H__ */