1 | /* GIO - GLib Input, Output and Streaming Library |
2 | * |
3 | * Copyright (C) 2006-2007 Red Hat, Inc. |
4 | * |
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.1 of the License, or (at your option) any later version. |
9 | * |
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. |
14 | * |
15 | * You should have received a copy of the GNU Lesser General |
16 | * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. |
17 | * |
18 | * Author: Alexander Larsson <alexl@redhat.com> |
19 | */ |
20 | |
21 | #ifndef __G_FILE_H__ |
22 | #define __G_FILE_H__ |
23 | |
24 | #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) |
25 | #error "Only <gio/gio.h> can be included directly." |
26 | #endif |
27 | |
28 | #include <gio/giotypes.h> |
29 | |
30 | G_BEGIN_DECLS |
31 | |
32 | #define G_TYPE_FILE (g_file_get_type ()) |
33 | #define G_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE, GFile)) |
34 | #define G_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE)) |
35 | #define G_FILE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE, GFileIface)) |
36 | |
37 | #if 0 |
38 | /** |
39 | * GFile: |
40 | * |
41 | * A handle to an object implementing the #GFileIface interface. |
42 | * Generally stores a location within the file system. Handles do not |
43 | * necessarily represent files or directories that currently exist. |
44 | **/ |
45 | typedef struct _GFile GFile; /* Dummy typedef */ |
46 | #endif |
47 | typedef struct _GFileIface GFileIface; |
48 | |
49 | |
50 | /** |
51 | * GFileIface: |
52 | * @g_iface: The parent interface. |
53 | * @dup: Duplicates a #GFile. |
54 | * @hash: Creates a hash of a #GFile. |
55 | * @equal: Checks equality of two given #GFiles. |
56 | * @is_native: Checks to see if a file is native to the system. |
57 | * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme. |
58 | * @get_uri_scheme: Gets the URI scheme for a #GFile. |
59 | * @get_basename: Gets the basename for a given #GFile. |
60 | * @get_path: Gets the current path within a #GFile. |
61 | * @get_uri: Gets a URI for the path within a #GFile. |
62 | * @get_parse_name: Gets the parsed name for the #GFile. |
63 | * @get_parent: Gets the parent directory for the #GFile. |
64 | * @prefix_matches: Checks whether a #GFile contains a specified file. |
65 | * @get_relative_path: Gets the path for a #GFile relative to a given path. |
66 | * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path. |
67 | * @get_child_for_display_name: Gets the child #GFile for a given display name. |
68 | * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile. |
69 | * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile. |
70 | * @enumerate_children_finish: Finishes asynchronously enumerating the children. |
71 | * @query_info: Gets the #GFileInfo for a #GFile. |
72 | * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile. |
73 | * @query_info_finish: Finishes an asynchronous query info operation. |
74 | * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on. |
75 | * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on. |
76 | * @query_filesystem_info_finish: Finishes asynchronously getting the file system info. |
77 | * @find_enclosing_mount: Gets a #GMount for the #GFile. |
78 | * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile. |
79 | * @find_enclosing_mount_finish: Finishes asynchronously getting the volume. |
80 | * @set_display_name: Sets the display name for a #GFile. |
81 | * @set_display_name_async: Asynchronously sets a #GFile's display name. |
82 | * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name. |
83 | * @query_settable_attributes: Returns a list of #GFileAttributes that can be set. |
84 | * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttributes that can be set. |
85 | * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes. |
86 | * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable. |
87 | * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable. |
88 | * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces. |
89 | * @set_attribute: Sets a #GFileAttribute. |
90 | * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo. |
91 | * @set_attributes_async: Asynchronously sets a file's attributes. |
92 | * @set_attributes_finish: Finishes setting a file's attributes asynchronously. |
93 | * @read_fn: Reads a file asynchronously. |
94 | * @read_async: Asynchronously reads a file. |
95 | * @read_finish: Finishes asynchronously reading a file. |
96 | * @append_to: Writes to the end of a file. |
97 | * @append_to_async: Asynchronously writes to the end of a file. |
98 | * @append_to_finish: Finishes an asynchronous file append operation. |
99 | * @create: Creates a new file. |
100 | * @create_async: Asynchronously creates a file. |
101 | * @create_finish: Finishes asynchronously creating a file. |
102 | * @replace: Replaces the contents of a file. |
103 | * @replace_async: Asynchronously replaces the contents of a file. |
104 | * @replace_finish: Finishes asynchronously replacing a file. |
105 | * @delete_file: Deletes a file. |
106 | * @delete_file_async: Asynchronously deletes a file. |
107 | * @delete_file_finish: Finishes an asynchronous delete. |
108 | * @trash: Sends a #GFile to the Trash location. |
109 | * @trash_async: Asynchronously sends a #GFile to the Trash location. |
110 | * @trash_finish: Finishes an asynchronous file trashing operation. |
111 | * @make_directory: Makes a directory. |
112 | * @make_directory_async: Asynchronously makes a directory. |
113 | * @make_directory_finish: Finishes making a directory asynchronously. |
114 | * @make_symbolic_link: Makes a symbolic link. |
115 | * @_make_symbolic_link_async: Asynchronously makes a symbolic link |
116 | * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously. |
117 | * @copy: Copies a file. |
118 | * @copy_async: Asynchronously copies a file. |
119 | * @copy_finish: Finishes an asynchronous copy operation. |
120 | * @move: Moves a file. |
121 | * @_move_async: Asynchronously moves a file. |
122 | * @_move_finish: Finishes an asynchronous move operation. |
123 | * @mount_mountable: Mounts a mountable object. |
124 | * @mount_mountable_finish: Finishes a mounting operation. |
125 | * @unmount_mountable: Unmounts a mountable object. |
126 | * @unmount_mountable_finish: Finishes an unmount operation. |
127 | * @eject_mountable: Ejects a mountable. |
128 | * @eject_mountable_finish: Finishes an eject operation. |
129 | * @mount_enclosing_volume: Mounts a specified location. |
130 | * @mount_enclosing_volume_finish: Finishes mounting a specified location. |
131 | * @monitor_dir: Creates a #GFileMonitor for the location. |
132 | * @monitor_file: Creates a #GFileMonitor for the location. |
133 | * @open_readwrite: Open file read/write. Since 2.22. |
134 | * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22. |
135 | * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22. |
136 | * @create_readwrite: Creates file read/write. Since 2.22. |
137 | * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22. |
138 | * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22. |
139 | * @replace_readwrite: Replaces file read/write. Since 2.22. |
140 | * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22. |
141 | * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22. |
142 | * @start_mountable: Starts a mountable object. Since 2.22. |
143 | * @start_mountable_finish: Finishes an start operation. Since 2.22. |
144 | * @stop_mountable: Stops a mountable. Since 2.22. |
145 | * @stop_mountable_finish: Finishes an stop operation. Since 2.22. |
146 | * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22. |
147 | * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22. |
148 | * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22. |
149 | * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22. |
150 | * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22. |
151 | * @poll_mountable: Polls a mountable object for media changes. Since 2.22. |
152 | * @poll_mountable_finish: Finishes an poll operation for media changes. Since 2.22. |
153 | * @measure_disk_usage: Recursively measures the disk usage of @file. Since 2.38 |
154 | * @measure_disk_usage_async: Asynchronously recursively measures the disk usage of @file. Since 2.38 |
155 | * @measure_disk_usage_finish: Finishes an asynchronous recursive measurement of the disk usage of @file. Since 2.38 |
156 | * |
157 | * An interface for writing VFS file handles. |
158 | **/ |
159 | struct _GFileIface |
160 | { |
161 | GTypeInterface g_iface; |
162 | |
163 | /* Virtual Table */ |
164 | |
165 | GFile * (* dup) (GFile *file); |
166 | guint (* hash) (GFile *file); |
167 | gboolean (* equal) (GFile *file1, |
168 | GFile *file2); |
169 | gboolean (* is_native) (GFile *file); |
170 | gboolean (* has_uri_scheme) (GFile *file, |
171 | const char *uri_scheme); |
172 | char * (* get_uri_scheme) (GFile *file); |
173 | char * (* get_basename) (GFile *file); |
174 | char * (* get_path) (GFile *file); |
175 | char * (* get_uri) (GFile *file); |
176 | char * (* get_parse_name) (GFile *file); |
177 | GFile * (* get_parent) (GFile *file); |
178 | gboolean (* prefix_matches) (GFile *prefix, |
179 | GFile *file); |
180 | char * (* get_relative_path) (GFile *parent, |
181 | GFile *descendant); |
182 | GFile * (* resolve_relative_path) (GFile *file, |
183 | const char *relative_path); |
184 | GFile * (* get_child_for_display_name) (GFile *file, |
185 | const char *display_name, |
186 | GError **error); |
187 | |
188 | GFileEnumerator * (* enumerate_children) (GFile *file, |
189 | const char *attributes, |
190 | GFileQueryInfoFlags flags, |
191 | GCancellable *cancellable, |
192 | GError **error); |
193 | void (* enumerate_children_async) (GFile *file, |
194 | const char *attributes, |
195 | GFileQueryInfoFlags flags, |
196 | int io_priority, |
197 | GCancellable *cancellable, |
198 | GAsyncReadyCallback callback, |
199 | gpointer user_data); |
200 | GFileEnumerator * (* enumerate_children_finish) (GFile *file, |
201 | GAsyncResult *res, |
202 | GError **error); |
203 | |
204 | GFileInfo * (* query_info) (GFile *file, |
205 | const char *attributes, |
206 | GFileQueryInfoFlags flags, |
207 | GCancellable *cancellable, |
208 | GError **error); |
209 | void (* query_info_async) (GFile *file, |
210 | const char *attributes, |
211 | GFileQueryInfoFlags flags, |
212 | int io_priority, |
213 | GCancellable *cancellable, |
214 | GAsyncReadyCallback callback, |
215 | gpointer user_data); |
216 | GFileInfo * (* query_info_finish) (GFile *file, |
217 | GAsyncResult *res, |
218 | GError **error); |
219 | |
220 | GFileInfo * (* query_filesystem_info) (GFile *file, |
221 | const char *attributes, |
222 | GCancellable *cancellable, |
223 | GError **error); |
224 | void (* query_filesystem_info_async) (GFile *file, |
225 | const char *attributes, |
226 | int io_priority, |
227 | GCancellable *cancellable, |
228 | GAsyncReadyCallback callback, |
229 | gpointer user_data); |
230 | GFileInfo * (* query_filesystem_info_finish)(GFile *file, |
231 | GAsyncResult *res, |
232 | GError **error); |
233 | |
234 | GMount * (* find_enclosing_mount) (GFile *file, |
235 | GCancellable *cancellable, |
236 | GError **error); |
237 | void (* find_enclosing_mount_async) (GFile *file, |
238 | int io_priority, |
239 | GCancellable *cancellable, |
240 | GAsyncReadyCallback callback, |
241 | gpointer user_data); |
242 | GMount * (* find_enclosing_mount_finish) (GFile *file, |
243 | GAsyncResult *res, |
244 | GError **error); |
245 | |
246 | GFile * (* set_display_name) (GFile *file, |
247 | const char *display_name, |
248 | GCancellable *cancellable, |
249 | GError **error); |
250 | void (* set_display_name_async) (GFile *file, |
251 | const char *display_name, |
252 | int io_priority, |
253 | GCancellable *cancellable, |
254 | GAsyncReadyCallback callback, |
255 | gpointer user_data); |
256 | GFile * (* set_display_name_finish) (GFile *file, |
257 | GAsyncResult *res, |
258 | GError **error); |
259 | |
260 | GFileAttributeInfoList * (* query_settable_attributes) (GFile *file, |
261 | GCancellable *cancellable, |
262 | GError **error); |
263 | void (* _query_settable_attributes_async) (void); |
264 | void (* _query_settable_attributes_finish) (void); |
265 | |
266 | GFileAttributeInfoList * (* query_writable_namespaces) (GFile *file, |
267 | GCancellable *cancellable, |
268 | GError **error); |
269 | void (* _query_writable_namespaces_async) (void); |
270 | void (* _query_writable_namespaces_finish) (void); |
271 | |
272 | gboolean (* set_attribute) (GFile *file, |
273 | const char *attribute, |
274 | GFileAttributeType type, |
275 | gpointer value_p, |
276 | GFileQueryInfoFlags flags, |
277 | GCancellable *cancellable, |
278 | GError **error); |
279 | gboolean (* set_attributes_from_info) (GFile *file, |
280 | GFileInfo *info, |
281 | GFileQueryInfoFlags flags, |
282 | GCancellable *cancellable, |
283 | GError **error); |
284 | void (* set_attributes_async) (GFile *file, |
285 | GFileInfo *info, |
286 | GFileQueryInfoFlags flags, |
287 | int io_priority, |
288 | GCancellable *cancellable, |
289 | GAsyncReadyCallback callback, |
290 | gpointer user_data); |
291 | gboolean (* set_attributes_finish) (GFile *file, |
292 | GAsyncResult *result, |
293 | GFileInfo **info, |
294 | GError **error); |
295 | |
296 | GFileInputStream * (* read_fn) (GFile *file, |
297 | GCancellable *cancellable, |
298 | GError **error); |
299 | void (* read_async) (GFile *file, |
300 | int io_priority, |
301 | GCancellable *cancellable, |
302 | GAsyncReadyCallback callback, |
303 | gpointer user_data); |
304 | GFileInputStream * (* read_finish) (GFile *file, |
305 | GAsyncResult *res, |
306 | GError **error); |
307 | |
308 | GFileOutputStream * (* append_to) (GFile *file, |
309 | GFileCreateFlags flags, |
310 | GCancellable *cancellable, |
311 | GError **error); |
312 | void (* append_to_async) (GFile *file, |
313 | GFileCreateFlags flags, |
314 | int io_priority, |
315 | GCancellable *cancellable, |
316 | GAsyncReadyCallback callback, |
317 | gpointer user_data); |
318 | GFileOutputStream * (* append_to_finish) (GFile *file, |
319 | GAsyncResult *res, |
320 | GError **error); |
321 | |
322 | GFileOutputStream * (* create) (GFile *file, |
323 | GFileCreateFlags flags, |
324 | GCancellable *cancellable, |
325 | GError **error); |
326 | void (* create_async) (GFile *file, |
327 | GFileCreateFlags flags, |
328 | int io_priority, |
329 | GCancellable *cancellable, |
330 | GAsyncReadyCallback callback, |
331 | gpointer user_data); |
332 | GFileOutputStream * (* create_finish) (GFile *file, |
333 | GAsyncResult *res, |
334 | GError **error); |
335 | |
336 | GFileOutputStream * (* replace) (GFile *file, |
337 | const char *etag, |
338 | gboolean make_backup, |
339 | GFileCreateFlags flags, |
340 | GCancellable *cancellable, |
341 | GError **error); |
342 | void (* replace_async) (GFile *file, |
343 | const char *etag, |
344 | gboolean make_backup, |
345 | GFileCreateFlags flags, |
346 | int io_priority, |
347 | GCancellable *cancellable, |
348 | GAsyncReadyCallback callback, |
349 | gpointer user_data); |
350 | GFileOutputStream * (* replace_finish) (GFile *file, |
351 | GAsyncResult *res, |
352 | GError **error); |
353 | |
354 | gboolean (* delete_file) (GFile *file, |
355 | GCancellable *cancellable, |
356 | GError **error); |
357 | void (* delete_file_async) (GFile *file, |
358 | int io_priority, |
359 | GCancellable *cancellable, |
360 | GAsyncReadyCallback callback, |
361 | gpointer user_data); |
362 | gboolean (* delete_file_finish) (GFile *file, |
363 | GAsyncResult *result, |
364 | GError **error); |
365 | |
366 | gboolean (* trash) (GFile *file, |
367 | GCancellable *cancellable, |
368 | GError **error); |
369 | void (* trash_async) (GFile *file, |
370 | int io_priority, |
371 | GCancellable *cancellable, |
372 | GAsyncReadyCallback callback, |
373 | gpointer user_data); |
374 | gboolean (* trash_finish) (GFile *file, |
375 | GAsyncResult *result, |
376 | GError **error); |
377 | |
378 | gboolean (* make_directory) (GFile *file, |
379 | GCancellable *cancellable, |
380 | GError **error); |
381 | void (* make_directory_async) (GFile *file, |
382 | int io_priority, |
383 | GCancellable *cancellable, |
384 | GAsyncReadyCallback callback, |
385 | gpointer user_data); |
386 | gboolean (* make_directory_finish) (GFile *file, |
387 | GAsyncResult *result, |
388 | GError **error); |
389 | |
390 | gboolean (* make_symbolic_link) (GFile *file, |
391 | const char *symlink_value, |
392 | GCancellable *cancellable, |
393 | GError **error); |
394 | void (* _make_symbolic_link_async) (void); |
395 | void (* _make_symbolic_link_finish) (void); |
396 | |
397 | gboolean (* copy) (GFile *source, |
398 | GFile *destination, |
399 | GFileCopyFlags flags, |
400 | GCancellable *cancellable, |
401 | GFileProgressCallback progress_callback, |
402 | gpointer progress_callback_data, |
403 | GError **error); |
404 | void (* copy_async) (GFile *source, |
405 | GFile *destination, |
406 | GFileCopyFlags flags, |
407 | int io_priority, |
408 | GCancellable *cancellable, |
409 | GFileProgressCallback progress_callback, |
410 | gpointer progress_callback_data, |
411 | GAsyncReadyCallback callback, |
412 | gpointer user_data); |
413 | gboolean (* copy_finish) (GFile *file, |
414 | GAsyncResult *res, |
415 | GError **error); |
416 | |
417 | gboolean (* move) (GFile *source, |
418 | GFile *destination, |
419 | GFileCopyFlags flags, |
420 | GCancellable *cancellable, |
421 | GFileProgressCallback progress_callback, |
422 | gpointer progress_callback_data, |
423 | GError **error); |
424 | void (* _move_async) (void); |
425 | void (* _move_finish) (void); |
426 | |
427 | void (* mount_mountable) (GFile *file, |
428 | GMountMountFlags flags, |
429 | GMountOperation *mount_operation, |
430 | GCancellable *cancellable, |
431 | GAsyncReadyCallback callback, |
432 | gpointer user_data); |
433 | GFile * (* mount_mountable_finish) (GFile *file, |
434 | GAsyncResult *result, |
435 | GError **error); |
436 | |
437 | void (* unmount_mountable) (GFile *file, |
438 | GMountUnmountFlags flags, |
439 | GCancellable *cancellable, |
440 | GAsyncReadyCallback callback, |
441 | gpointer user_data); |
442 | gboolean (* unmount_mountable_finish) (GFile *file, |
443 | GAsyncResult *result, |
444 | GError **error); |
445 | |
446 | void (* eject_mountable) (GFile *file, |
447 | GMountUnmountFlags flags, |
448 | GCancellable *cancellable, |
449 | GAsyncReadyCallback callback, |
450 | gpointer user_data); |
451 | gboolean (* eject_mountable_finish) (GFile *file, |
452 | GAsyncResult *result, |
453 | GError **error); |
454 | |
455 | void (* mount_enclosing_volume) (GFile *location, |
456 | GMountMountFlags flags, |
457 | GMountOperation *mount_operation, |
458 | GCancellable *cancellable, |
459 | GAsyncReadyCallback callback, |
460 | gpointer user_data); |
461 | gboolean (* mount_enclosing_volume_finish) (GFile *location, |
462 | GAsyncResult *result, |
463 | GError **error); |
464 | |
465 | GFileMonitor * (* monitor_dir) (GFile *file, |
466 | GFileMonitorFlags flags, |
467 | GCancellable *cancellable, |
468 | GError **error); |
469 | GFileMonitor * (* monitor_file) (GFile *file, |
470 | GFileMonitorFlags flags, |
471 | GCancellable *cancellable, |
472 | GError **error); |
473 | |
474 | GFileIOStream * (* open_readwrite) (GFile *file, |
475 | GCancellable *cancellable, |
476 | GError **error); |
477 | void (* open_readwrite_async) (GFile *file, |
478 | int io_priority, |
479 | GCancellable *cancellable, |
480 | GAsyncReadyCallback callback, |
481 | gpointer user_data); |
482 | GFileIOStream * (* open_readwrite_finish) (GFile *file, |
483 | GAsyncResult *res, |
484 | GError **error); |
485 | GFileIOStream * (* create_readwrite) (GFile *file, |
486 | GFileCreateFlags flags, |
487 | GCancellable *cancellable, |
488 | GError **error); |
489 | void (* create_readwrite_async) (GFile *file, |
490 | GFileCreateFlags flags, |
491 | int io_priority, |
492 | GCancellable *cancellable, |
493 | GAsyncReadyCallback callback, |
494 | gpointer user_data); |
495 | GFileIOStream * (* create_readwrite_finish) (GFile *file, |
496 | GAsyncResult *res, |
497 | GError **error); |
498 | GFileIOStream * (* replace_readwrite) (GFile *file, |
499 | const char *etag, |
500 | gboolean make_backup, |
501 | GFileCreateFlags flags, |
502 | GCancellable *cancellable, |
503 | GError **error); |
504 | void (* replace_readwrite_async) (GFile *file, |
505 | const char *etag, |
506 | gboolean make_backup, |
507 | GFileCreateFlags flags, |
508 | int io_priority, |
509 | GCancellable *cancellable, |
510 | GAsyncReadyCallback callback, |
511 | gpointer user_data); |
512 | GFileIOStream * (* replace_readwrite_finish) (GFile *file, |
513 | GAsyncResult *res, |
514 | GError **error); |
515 | |
516 | void (* start_mountable) (GFile *file, |
517 | GDriveStartFlags flags, |
518 | GMountOperation *start_operation, |
519 | GCancellable *cancellable, |
520 | GAsyncReadyCallback callback, |
521 | gpointer user_data); |
522 | gboolean (* start_mountable_finish) (GFile *file, |
523 | GAsyncResult *result, |
524 | GError **error); |
525 | |
526 | void (* stop_mountable) (GFile *file, |
527 | GMountUnmountFlags flags, |
528 | GMountOperation *mount_operation, |
529 | GCancellable *cancellable, |
530 | GAsyncReadyCallback callback, |
531 | gpointer user_data); |
532 | gboolean (* stop_mountable_finish) (GFile *file, |
533 | GAsyncResult *result, |
534 | GError **error); |
535 | |
536 | gboolean supports_thread_contexts; |
537 | |
538 | void (* unmount_mountable_with_operation) (GFile *file, |
539 | GMountUnmountFlags flags, |
540 | GMountOperation *mount_operation, |
541 | GCancellable *cancellable, |
542 | GAsyncReadyCallback callback, |
543 | gpointer user_data); |
544 | gboolean (* unmount_mountable_with_operation_finish) (GFile *file, |
545 | GAsyncResult *result, |
546 | GError **error); |
547 | |
548 | void (* eject_mountable_with_operation) (GFile *file, |
549 | GMountUnmountFlags flags, |
550 | GMountOperation *mount_operation, |
551 | GCancellable *cancellable, |
552 | GAsyncReadyCallback callback, |
553 | gpointer user_data); |
554 | gboolean (* eject_mountable_with_operation_finish) (GFile *file, |
555 | GAsyncResult *result, |
556 | GError **error); |
557 | |
558 | void (* poll_mountable) (GFile *file, |
559 | GCancellable *cancellable, |
560 | GAsyncReadyCallback callback, |
561 | gpointer user_data); |
562 | gboolean (* poll_mountable_finish) (GFile *file, |
563 | GAsyncResult *result, |
564 | GError **error); |
565 | |
566 | gboolean (* measure_disk_usage) (GFile *file, |
567 | GFileMeasureFlags flags, |
568 | GCancellable *cancellable, |
569 | GFileMeasureProgressCallback progress_callback, |
570 | gpointer progress_data, |
571 | guint64 *disk_usage, |
572 | guint64 *num_dirs, |
573 | guint64 *num_files, |
574 | GError **error); |
575 | void (* measure_disk_usage_async) (GFile *file, |
576 | GFileMeasureFlags flags, |
577 | gint io_priority, |
578 | GCancellable *cancellable, |
579 | GFileMeasureProgressCallback progress_callback, |
580 | gpointer progress_data, |
581 | GAsyncReadyCallback callback, |
582 | gpointer user_data); |
583 | gboolean (* measure_disk_usage_finish) (GFile *file, |
584 | GAsyncResult *result, |
585 | guint64 *disk_usage, |
586 | guint64 *num_dirs, |
587 | guint64 *num_files, |
588 | GError **error); |
589 | }; |
590 | |
591 | GLIB_AVAILABLE_IN_ALL |
592 | GType g_file_get_type (void) G_GNUC_CONST; |
593 | |
594 | GLIB_AVAILABLE_IN_ALL |
595 | GFile * g_file_new_for_path (const char *path); |
596 | GLIB_AVAILABLE_IN_ALL |
597 | GFile * g_file_new_for_uri (const char *uri); |
598 | GLIB_AVAILABLE_IN_ALL |
599 | GFile * g_file_new_for_commandline_arg (const char *arg); |
600 | GLIB_AVAILABLE_IN_2_36 |
601 | GFile * g_file_new_for_commandline_arg_and_cwd (const gchar *arg, |
602 | const gchar *cwd); |
603 | GLIB_AVAILABLE_IN_2_32 |
604 | GFile * g_file_new_tmp (const char *tmpl, |
605 | GFileIOStream **iostream, |
606 | GError **error); |
607 | GLIB_AVAILABLE_IN_ALL |
608 | GFile * g_file_parse_name (const char *parse_name); |
609 | GLIB_AVAILABLE_IN_2_56 |
610 | GFile * g_file_new_build_filename (const gchar *first_element, |
611 | ...) G_GNUC_NULL_TERMINATED; |
612 | GLIB_AVAILABLE_IN_ALL |
613 | GFile * g_file_dup (GFile *file); |
614 | GLIB_AVAILABLE_IN_ALL |
615 | guint g_file_hash (gconstpointer file); |
616 | GLIB_AVAILABLE_IN_ALL |
617 | gboolean g_file_equal (GFile *file1, |
618 | GFile *file2); |
619 | GLIB_AVAILABLE_IN_ALL |
620 | char * g_file_get_basename (GFile *file); |
621 | GLIB_AVAILABLE_IN_ALL |
622 | char * g_file_get_path (GFile *file); |
623 | GLIB_AVAILABLE_IN_2_56 |
624 | const char * g_file_peek_path (GFile *file); |
625 | GLIB_AVAILABLE_IN_ALL |
626 | char * g_file_get_uri (GFile *file); |
627 | GLIB_AVAILABLE_IN_ALL |
628 | char * g_file_get_parse_name (GFile *file); |
629 | GLIB_AVAILABLE_IN_ALL |
630 | GFile * g_file_get_parent (GFile *file); |
631 | GLIB_AVAILABLE_IN_ALL |
632 | gboolean g_file_has_parent (GFile *file, |
633 | GFile *parent); |
634 | GLIB_AVAILABLE_IN_ALL |
635 | GFile * g_file_get_child (GFile *file, |
636 | const char *name); |
637 | GLIB_AVAILABLE_IN_ALL |
638 | GFile * g_file_get_child_for_display_name (GFile *file, |
639 | const char *display_name, |
640 | GError **error); |
641 | GLIB_AVAILABLE_IN_ALL |
642 | gboolean g_file_has_prefix (GFile *file, |
643 | GFile *prefix); |
644 | GLIB_AVAILABLE_IN_ALL |
645 | char * g_file_get_relative_path (GFile *parent, |
646 | GFile *descendant); |
647 | GLIB_AVAILABLE_IN_ALL |
648 | GFile * g_file_resolve_relative_path (GFile *file, |
649 | const char *relative_path); |
650 | GLIB_AVAILABLE_IN_ALL |
651 | gboolean g_file_is_native (GFile *file); |
652 | GLIB_AVAILABLE_IN_ALL |
653 | gboolean g_file_has_uri_scheme (GFile *file, |
654 | const char *uri_scheme); |
655 | GLIB_AVAILABLE_IN_ALL |
656 | char * g_file_get_uri_scheme (GFile *file); |
657 | GLIB_AVAILABLE_IN_ALL |
658 | GFileInputStream * g_file_read (GFile *file, |
659 | GCancellable *cancellable, |
660 | GError **error); |
661 | GLIB_AVAILABLE_IN_ALL |
662 | void g_file_read_async (GFile *file, |
663 | int io_priority, |
664 | GCancellable *cancellable, |
665 | GAsyncReadyCallback callback, |
666 | gpointer user_data); |
667 | GLIB_AVAILABLE_IN_ALL |
668 | GFileInputStream * g_file_read_finish (GFile *file, |
669 | GAsyncResult *res, |
670 | GError **error); |
671 | GLIB_AVAILABLE_IN_ALL |
672 | GFileOutputStream * g_file_append_to (GFile *file, |
673 | GFileCreateFlags flags, |
674 | GCancellable *cancellable, |
675 | GError **error); |
676 | GLIB_AVAILABLE_IN_ALL |
677 | GFileOutputStream * g_file_create (GFile *file, |
678 | GFileCreateFlags flags, |
679 | GCancellable *cancellable, |
680 | GError **error); |
681 | GLIB_AVAILABLE_IN_ALL |
682 | GFileOutputStream * g_file_replace (GFile *file, |
683 | const char *etag, |
684 | gboolean make_backup, |
685 | GFileCreateFlags flags, |
686 | GCancellable *cancellable, |
687 | GError **error); |
688 | GLIB_AVAILABLE_IN_ALL |
689 | void g_file_append_to_async (GFile *file, |
690 | GFileCreateFlags flags, |
691 | int io_priority, |
692 | GCancellable *cancellable, |
693 | GAsyncReadyCallback callback, |
694 | gpointer user_data); |
695 | GLIB_AVAILABLE_IN_ALL |
696 | GFileOutputStream * g_file_append_to_finish (GFile *file, |
697 | GAsyncResult *res, |
698 | GError **error); |
699 | GLIB_AVAILABLE_IN_ALL |
700 | void g_file_create_async (GFile *file, |
701 | GFileCreateFlags flags, |
702 | int io_priority, |
703 | GCancellable *cancellable, |
704 | GAsyncReadyCallback callback, |
705 | gpointer user_data); |
706 | GLIB_AVAILABLE_IN_ALL |
707 | GFileOutputStream * g_file_create_finish (GFile *file, |
708 | GAsyncResult *res, |
709 | GError **error); |
710 | GLIB_AVAILABLE_IN_ALL |
711 | void g_file_replace_async (GFile *file, |
712 | const char *etag, |
713 | gboolean make_backup, |
714 | GFileCreateFlags flags, |
715 | int io_priority, |
716 | GCancellable *cancellable, |
717 | GAsyncReadyCallback callback, |
718 | gpointer user_data); |
719 | GLIB_AVAILABLE_IN_ALL |
720 | GFileOutputStream * g_file_replace_finish (GFile *file, |
721 | GAsyncResult *res, |
722 | GError **error); |
723 | GLIB_AVAILABLE_IN_ALL |
724 | GFileIOStream * g_file_open_readwrite (GFile *file, |
725 | GCancellable *cancellable, |
726 | GError **error); |
727 | GLIB_AVAILABLE_IN_ALL |
728 | void g_file_open_readwrite_async (GFile *file, |
729 | int io_priority, |
730 | GCancellable *cancellable, |
731 | GAsyncReadyCallback callback, |
732 | gpointer user_data); |
733 | GLIB_AVAILABLE_IN_ALL |
734 | GFileIOStream * g_file_open_readwrite_finish (GFile *file, |
735 | GAsyncResult *res, |
736 | GError **error); |
737 | GLIB_AVAILABLE_IN_ALL |
738 | GFileIOStream * g_file_create_readwrite (GFile *file, |
739 | GFileCreateFlags flags, |
740 | GCancellable *cancellable, |
741 | GError **error); |
742 | GLIB_AVAILABLE_IN_ALL |
743 | void g_file_create_readwrite_async (GFile *file, |
744 | GFileCreateFlags flags, |
745 | int io_priority, |
746 | GCancellable *cancellable, |
747 | GAsyncReadyCallback callback, |
748 | gpointer user_data); |
749 | GLIB_AVAILABLE_IN_ALL |
750 | GFileIOStream * g_file_create_readwrite_finish (GFile *file, |
751 | GAsyncResult *res, |
752 | GError **error); |
753 | GLIB_AVAILABLE_IN_ALL |
754 | GFileIOStream * g_file_replace_readwrite (GFile *file, |
755 | const char *etag, |
756 | gboolean make_backup, |
757 | GFileCreateFlags flags, |
758 | GCancellable *cancellable, |
759 | GError **error); |
760 | GLIB_AVAILABLE_IN_ALL |
761 | void g_file_replace_readwrite_async (GFile *file, |
762 | const char *etag, |
763 | gboolean make_backup, |
764 | GFileCreateFlags flags, |
765 | int io_priority, |
766 | GCancellable *cancellable, |
767 | GAsyncReadyCallback callback, |
768 | gpointer user_data); |
769 | GLIB_AVAILABLE_IN_ALL |
770 | GFileIOStream * g_file_replace_readwrite_finish (GFile *file, |
771 | GAsyncResult *res, |
772 | GError **error); |
773 | GLIB_AVAILABLE_IN_ALL |
774 | gboolean g_file_query_exists (GFile *file, |
775 | GCancellable *cancellable); |
776 | GLIB_AVAILABLE_IN_ALL |
777 | GFileType g_file_query_file_type (GFile *file, |
778 | GFileQueryInfoFlags flags, |
779 | GCancellable *cancellable); |
780 | GLIB_AVAILABLE_IN_ALL |
781 | GFileInfo * g_file_query_info (GFile *file, |
782 | const char *attributes, |
783 | GFileQueryInfoFlags flags, |
784 | GCancellable *cancellable, |
785 | GError **error); |
786 | GLIB_AVAILABLE_IN_ALL |
787 | void g_file_query_info_async (GFile *file, |
788 | const char *attributes, |
789 | GFileQueryInfoFlags flags, |
790 | int io_priority, |
791 | GCancellable *cancellable, |
792 | GAsyncReadyCallback callback, |
793 | gpointer user_data); |
794 | GLIB_AVAILABLE_IN_ALL |
795 | GFileInfo * g_file_query_info_finish (GFile *file, |
796 | GAsyncResult *res, |
797 | GError **error); |
798 | GLIB_AVAILABLE_IN_ALL |
799 | GFileInfo * g_file_query_filesystem_info (GFile *file, |
800 | const char *attributes, |
801 | GCancellable *cancellable, |
802 | GError **error); |
803 | GLIB_AVAILABLE_IN_ALL |
804 | void g_file_query_filesystem_info_async (GFile *file, |
805 | const char *attributes, |
806 | int io_priority, |
807 | GCancellable *cancellable, |
808 | GAsyncReadyCallback callback, |
809 | gpointer user_data); |
810 | GLIB_AVAILABLE_IN_ALL |
811 | GFileInfo * g_file_query_filesystem_info_finish (GFile *file, |
812 | GAsyncResult *res, |
813 | GError **error); |
814 | GLIB_AVAILABLE_IN_ALL |
815 | GMount * g_file_find_enclosing_mount (GFile *file, |
816 | GCancellable *cancellable, |
817 | GError **error); |
818 | GLIB_AVAILABLE_IN_ALL |
819 | void g_file_find_enclosing_mount_async (GFile *file, |
820 | int io_priority, |
821 | GCancellable *cancellable, |
822 | GAsyncReadyCallback callback, |
823 | gpointer user_data); |
824 | GLIB_AVAILABLE_IN_ALL |
825 | GMount * g_file_find_enclosing_mount_finish (GFile *file, |
826 | GAsyncResult *res, |
827 | GError **error); |
828 | GLIB_AVAILABLE_IN_ALL |
829 | GFileEnumerator * g_file_enumerate_children (GFile *file, |
830 | const char *attributes, |
831 | GFileQueryInfoFlags flags, |
832 | GCancellable *cancellable, |
833 | GError **error); |
834 | GLIB_AVAILABLE_IN_ALL |
835 | void g_file_enumerate_children_async (GFile *file, |
836 | const char *attributes, |
837 | GFileQueryInfoFlags flags, |
838 | int io_priority, |
839 | GCancellable *cancellable, |
840 | GAsyncReadyCallback callback, |
841 | gpointer user_data); |
842 | GLIB_AVAILABLE_IN_ALL |
843 | GFileEnumerator * g_file_enumerate_children_finish (GFile *file, |
844 | GAsyncResult *res, |
845 | GError **error); |
846 | GLIB_AVAILABLE_IN_ALL |
847 | GFile * g_file_set_display_name (GFile *file, |
848 | const char *display_name, |
849 | GCancellable *cancellable, |
850 | GError **error); |
851 | GLIB_AVAILABLE_IN_ALL |
852 | void g_file_set_display_name_async (GFile *file, |
853 | const char *display_name, |
854 | int io_priority, |
855 | GCancellable *cancellable, |
856 | GAsyncReadyCallback callback, |
857 | gpointer user_data); |
858 | GLIB_AVAILABLE_IN_ALL |
859 | GFile * g_file_set_display_name_finish (GFile *file, |
860 | GAsyncResult *res, |
861 | GError **error); |
862 | GLIB_AVAILABLE_IN_ALL |
863 | gboolean g_file_delete (GFile *file, |
864 | GCancellable *cancellable, |
865 | GError **error); |
866 | |
867 | GLIB_AVAILABLE_IN_2_34 |
868 | void g_file_delete_async (GFile *file, |
869 | int io_priority, |
870 | GCancellable *cancellable, |
871 | GAsyncReadyCallback callback, |
872 | gpointer user_data); |
873 | |
874 | GLIB_AVAILABLE_IN_2_34 |
875 | gboolean g_file_delete_finish (GFile *file, |
876 | GAsyncResult *result, |
877 | GError **error); |
878 | |
879 | GLIB_AVAILABLE_IN_ALL |
880 | gboolean g_file_trash (GFile *file, |
881 | GCancellable *cancellable, |
882 | GError **error); |
883 | |
884 | GLIB_AVAILABLE_IN_2_38 |
885 | void g_file_trash_async (GFile *file, |
886 | int io_priority, |
887 | GCancellable *cancellable, |
888 | GAsyncReadyCallback callback, |
889 | gpointer user_data); |
890 | |
891 | GLIB_AVAILABLE_IN_2_38 |
892 | gboolean g_file_trash_finish (GFile *file, |
893 | GAsyncResult *result, |
894 | GError **error); |
895 | |
896 | GLIB_AVAILABLE_IN_ALL |
897 | gboolean g_file_copy (GFile *source, |
898 | GFile *destination, |
899 | GFileCopyFlags flags, |
900 | GCancellable *cancellable, |
901 | GFileProgressCallback progress_callback, |
902 | gpointer progress_callback_data, |
903 | GError **error); |
904 | GLIB_AVAILABLE_IN_ALL |
905 | void g_file_copy_async (GFile *source, |
906 | GFile *destination, |
907 | GFileCopyFlags flags, |
908 | int io_priority, |
909 | GCancellable *cancellable, |
910 | GFileProgressCallback progress_callback, |
911 | gpointer progress_callback_data, |
912 | GAsyncReadyCallback callback, |
913 | gpointer user_data); |
914 | GLIB_AVAILABLE_IN_ALL |
915 | gboolean g_file_copy_finish (GFile *file, |
916 | GAsyncResult *res, |
917 | GError **error); |
918 | GLIB_AVAILABLE_IN_ALL |
919 | gboolean g_file_move (GFile *source, |
920 | GFile *destination, |
921 | GFileCopyFlags flags, |
922 | GCancellable *cancellable, |
923 | GFileProgressCallback progress_callback, |
924 | gpointer progress_callback_data, |
925 | GError **error); |
926 | GLIB_AVAILABLE_IN_ALL |
927 | gboolean g_file_make_directory (GFile *file, |
928 | GCancellable *cancellable, |
929 | GError **error); |
930 | GLIB_AVAILABLE_IN_2_38 |
931 | void g_file_make_directory_async (GFile *file, |
932 | int io_priority, |
933 | GCancellable *cancellable, |
934 | GAsyncReadyCallback callback, |
935 | gpointer user_data); |
936 | GLIB_AVAILABLE_IN_2_38 |
937 | gboolean g_file_make_directory_finish (GFile *file, |
938 | GAsyncResult *result, |
939 | GError **error); |
940 | |
941 | GLIB_AVAILABLE_IN_ALL |
942 | gboolean g_file_make_directory_with_parents (GFile *file, |
943 | GCancellable *cancellable, |
944 | GError **error); |
945 | GLIB_AVAILABLE_IN_ALL |
946 | gboolean g_file_make_symbolic_link (GFile *file, |
947 | const char *symlink_value, |
948 | GCancellable *cancellable, |
949 | GError **error); |
950 | GLIB_AVAILABLE_IN_ALL |
951 | GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file, |
952 | GCancellable *cancellable, |
953 | GError **error); |
954 | GLIB_AVAILABLE_IN_ALL |
955 | GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file, |
956 | GCancellable *cancellable, |
957 | GError **error); |
958 | GLIB_AVAILABLE_IN_ALL |
959 | gboolean g_file_set_attribute (GFile *file, |
960 | const char *attribute, |
961 | GFileAttributeType type, |
962 | gpointer value_p, |
963 | GFileQueryInfoFlags flags, |
964 | GCancellable *cancellable, |
965 | GError **error); |
966 | GLIB_AVAILABLE_IN_ALL |
967 | gboolean g_file_set_attributes_from_info (GFile *file, |
968 | GFileInfo *info, |
969 | GFileQueryInfoFlags flags, |
970 | GCancellable *cancellable, |
971 | GError **error); |
972 | GLIB_AVAILABLE_IN_ALL |
973 | void g_file_set_attributes_async (GFile *file, |
974 | GFileInfo *info, |
975 | GFileQueryInfoFlags flags, |
976 | int io_priority, |
977 | GCancellable *cancellable, |
978 | GAsyncReadyCallback callback, |
979 | gpointer user_data); |
980 | GLIB_AVAILABLE_IN_ALL |
981 | gboolean g_file_set_attributes_finish (GFile *file, |
982 | GAsyncResult *result, |
983 | GFileInfo **info, |
984 | GError **error); |
985 | GLIB_AVAILABLE_IN_ALL |
986 | gboolean g_file_set_attribute_string (GFile *file, |
987 | const char *attribute, |
988 | const char *value, |
989 | GFileQueryInfoFlags flags, |
990 | GCancellable *cancellable, |
991 | GError **error); |
992 | GLIB_AVAILABLE_IN_ALL |
993 | gboolean g_file_set_attribute_byte_string (GFile *file, |
994 | const char *attribute, |
995 | const char *value, |
996 | GFileQueryInfoFlags flags, |
997 | GCancellable *cancellable, |
998 | GError **error); |
999 | GLIB_AVAILABLE_IN_ALL |
1000 | gboolean g_file_set_attribute_uint32 (GFile *file, |
1001 | const char *attribute, |
1002 | guint32 value, |
1003 | GFileQueryInfoFlags flags, |
1004 | GCancellable *cancellable, |
1005 | GError **error); |
1006 | GLIB_AVAILABLE_IN_ALL |
1007 | gboolean g_file_set_attribute_int32 (GFile *file, |
1008 | const char *attribute, |
1009 | gint32 value, |
1010 | GFileQueryInfoFlags flags, |
1011 | GCancellable *cancellable, |
1012 | GError **error); |
1013 | GLIB_AVAILABLE_IN_ALL |
1014 | gboolean g_file_set_attribute_uint64 (GFile *file, |
1015 | const char *attribute, |
1016 | guint64 value, |
1017 | GFileQueryInfoFlags flags, |
1018 | GCancellable *cancellable, |
1019 | GError **error); |
1020 | GLIB_AVAILABLE_IN_ALL |
1021 | gboolean g_file_set_attribute_int64 (GFile *file, |
1022 | const char *attribute, |
1023 | gint64 value, |
1024 | GFileQueryInfoFlags flags, |
1025 | GCancellable *cancellable, |
1026 | GError **error); |
1027 | GLIB_AVAILABLE_IN_ALL |
1028 | void g_file_mount_enclosing_volume (GFile *location, |
1029 | GMountMountFlags flags, |
1030 | GMountOperation *mount_operation, |
1031 | GCancellable *cancellable, |
1032 | GAsyncReadyCallback callback, |
1033 | gpointer user_data); |
1034 | GLIB_AVAILABLE_IN_ALL |
1035 | gboolean g_file_mount_enclosing_volume_finish (GFile *location, |
1036 | GAsyncResult *result, |
1037 | GError **error); |
1038 | GLIB_AVAILABLE_IN_ALL |
1039 | void g_file_mount_mountable (GFile *file, |
1040 | GMountMountFlags flags, |
1041 | GMountOperation *mount_operation, |
1042 | GCancellable *cancellable, |
1043 | GAsyncReadyCallback callback, |
1044 | gpointer user_data); |
1045 | GLIB_AVAILABLE_IN_ALL |
1046 | GFile * g_file_mount_mountable_finish (GFile *file, |
1047 | GAsyncResult *result, |
1048 | GError **error); |
1049 | GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation) |
1050 | void g_file_unmount_mountable (GFile *file, |
1051 | GMountUnmountFlags flags, |
1052 | GCancellable *cancellable, |
1053 | GAsyncReadyCallback callback, |
1054 | gpointer user_data); |
1055 | |
1056 | GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation_finish) |
1057 | gboolean g_file_unmount_mountable_finish (GFile *file, |
1058 | GAsyncResult *result, |
1059 | GError **error); |
1060 | GLIB_AVAILABLE_IN_ALL |
1061 | void g_file_unmount_mountable_with_operation (GFile *file, |
1062 | GMountUnmountFlags flags, |
1063 | GMountOperation *mount_operation, |
1064 | GCancellable *cancellable, |
1065 | GAsyncReadyCallback callback, |
1066 | gpointer user_data); |
1067 | GLIB_AVAILABLE_IN_ALL |
1068 | gboolean g_file_unmount_mountable_with_operation_finish (GFile *file, |
1069 | GAsyncResult *result, |
1070 | GError **error); |
1071 | GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation) |
1072 | void g_file_eject_mountable (GFile *file, |
1073 | GMountUnmountFlags flags, |
1074 | GCancellable *cancellable, |
1075 | GAsyncReadyCallback callback, |
1076 | gpointer user_data); |
1077 | |
1078 | GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation_finish) |
1079 | gboolean g_file_eject_mountable_finish (GFile *file, |
1080 | GAsyncResult *result, |
1081 | GError **error); |
1082 | GLIB_AVAILABLE_IN_ALL |
1083 | void g_file_eject_mountable_with_operation (GFile *file, |
1084 | GMountUnmountFlags flags, |
1085 | GMountOperation *mount_operation, |
1086 | GCancellable *cancellable, |
1087 | GAsyncReadyCallback callback, |
1088 | gpointer user_data); |
1089 | GLIB_AVAILABLE_IN_ALL |
1090 | gboolean g_file_eject_mountable_with_operation_finish (GFile *file, |
1091 | GAsyncResult *result, |
1092 | GError **error); |
1093 | |
1094 | GLIB_AVAILABLE_IN_ALL |
1095 | gboolean g_file_copy_attributes (GFile *source, |
1096 | GFile *destination, |
1097 | GFileCopyFlags flags, |
1098 | GCancellable *cancellable, |
1099 | GError **error); |
1100 | |
1101 | |
1102 | GLIB_AVAILABLE_IN_ALL |
1103 | GFileMonitor* g_file_monitor_directory (GFile *file, |
1104 | GFileMonitorFlags flags, |
1105 | GCancellable *cancellable, |
1106 | GError **error); |
1107 | GLIB_AVAILABLE_IN_ALL |
1108 | GFileMonitor* g_file_monitor_file (GFile *file, |
1109 | GFileMonitorFlags flags, |
1110 | GCancellable *cancellable, |
1111 | GError **error); |
1112 | GLIB_AVAILABLE_IN_ALL |
1113 | GFileMonitor* g_file_monitor (GFile *file, |
1114 | GFileMonitorFlags flags, |
1115 | GCancellable *cancellable, |
1116 | GError **error); |
1117 | |
1118 | GLIB_AVAILABLE_IN_2_38 |
1119 | gboolean g_file_measure_disk_usage (GFile *file, |
1120 | GFileMeasureFlags flags, |
1121 | GCancellable *cancellable, |
1122 | GFileMeasureProgressCallback progress_callback, |
1123 | gpointer progress_data, |
1124 | guint64 *disk_usage, |
1125 | guint64 *num_dirs, |
1126 | guint64 *num_files, |
1127 | GError **error); |
1128 | |
1129 | GLIB_AVAILABLE_IN_2_38 |
1130 | void g_file_measure_disk_usage_async (GFile *file, |
1131 | GFileMeasureFlags flags, |
1132 | gint io_priority, |
1133 | GCancellable *cancellable, |
1134 | GFileMeasureProgressCallback progress_callback, |
1135 | gpointer progress_data, |
1136 | GAsyncReadyCallback callback, |
1137 | gpointer user_data); |
1138 | |
1139 | GLIB_AVAILABLE_IN_2_38 |
1140 | gboolean g_file_measure_disk_usage_finish (GFile *file, |
1141 | GAsyncResult *result, |
1142 | guint64 *disk_usage, |
1143 | guint64 *num_dirs, |
1144 | guint64 *num_files, |
1145 | GError **error); |
1146 | |
1147 | GLIB_AVAILABLE_IN_ALL |
1148 | void g_file_start_mountable (GFile *file, |
1149 | GDriveStartFlags flags, |
1150 | GMountOperation *start_operation, |
1151 | GCancellable *cancellable, |
1152 | GAsyncReadyCallback callback, |
1153 | gpointer user_data); |
1154 | GLIB_AVAILABLE_IN_ALL |
1155 | gboolean g_file_start_mountable_finish (GFile *file, |
1156 | GAsyncResult *result, |
1157 | GError **error); |
1158 | GLIB_AVAILABLE_IN_ALL |
1159 | void g_file_stop_mountable (GFile *file, |
1160 | GMountUnmountFlags flags, |
1161 | GMountOperation *mount_operation, |
1162 | GCancellable *cancellable, |
1163 | GAsyncReadyCallback callback, |
1164 | gpointer user_data); |
1165 | GLIB_AVAILABLE_IN_ALL |
1166 | gboolean g_file_stop_mountable_finish (GFile *file, |
1167 | GAsyncResult *result, |
1168 | GError **error); |
1169 | |
1170 | GLIB_AVAILABLE_IN_ALL |
1171 | void g_file_poll_mountable (GFile *file, |
1172 | GCancellable *cancellable, |
1173 | GAsyncReadyCallback callback, |
1174 | gpointer user_data); |
1175 | GLIB_AVAILABLE_IN_ALL |
1176 | gboolean g_file_poll_mountable_finish (GFile *file, |
1177 | GAsyncResult *result, |
1178 | GError **error); |
1179 | |
1180 | /* Utilities */ |
1181 | |
1182 | GLIB_AVAILABLE_IN_ALL |
1183 | GAppInfo *g_file_query_default_handler (GFile *file, |
1184 | GCancellable *cancellable, |
1185 | GError **error); |
1186 | GLIB_AVAILABLE_IN_ALL |
1187 | gboolean g_file_load_contents (GFile *file, |
1188 | GCancellable *cancellable, |
1189 | char **contents, |
1190 | gsize *length, |
1191 | char **etag_out, |
1192 | GError **error); |
1193 | GLIB_AVAILABLE_IN_ALL |
1194 | void g_file_load_contents_async (GFile *file, |
1195 | GCancellable *cancellable, |
1196 | GAsyncReadyCallback callback, |
1197 | gpointer user_data); |
1198 | GLIB_AVAILABLE_IN_ALL |
1199 | gboolean g_file_load_contents_finish (GFile *file, |
1200 | GAsyncResult *res, |
1201 | char **contents, |
1202 | gsize *length, |
1203 | char **etag_out, |
1204 | GError **error); |
1205 | GLIB_AVAILABLE_IN_ALL |
1206 | void g_file_load_partial_contents_async (GFile *file, |
1207 | GCancellable *cancellable, |
1208 | GFileReadMoreCallback read_more_callback, |
1209 | GAsyncReadyCallback callback, |
1210 | gpointer user_data); |
1211 | GLIB_AVAILABLE_IN_ALL |
1212 | gboolean g_file_load_partial_contents_finish (GFile *file, |
1213 | GAsyncResult *res, |
1214 | char **contents, |
1215 | gsize *length, |
1216 | char **etag_out, |
1217 | GError **error); |
1218 | GLIB_AVAILABLE_IN_ALL |
1219 | gboolean g_file_replace_contents (GFile *file, |
1220 | const char *contents, |
1221 | gsize length, |
1222 | const char *etag, |
1223 | gboolean make_backup, |
1224 | GFileCreateFlags flags, |
1225 | char **new_etag, |
1226 | GCancellable *cancellable, |
1227 | GError **error); |
1228 | GLIB_AVAILABLE_IN_ALL |
1229 | void g_file_replace_contents_async (GFile *file, |
1230 | const char *contents, |
1231 | gsize length, |
1232 | const char *etag, |
1233 | gboolean make_backup, |
1234 | GFileCreateFlags flags, |
1235 | GCancellable *cancellable, |
1236 | GAsyncReadyCallback callback, |
1237 | gpointer user_data); |
1238 | GLIB_AVAILABLE_IN_2_40 |
1239 | void g_file_replace_contents_bytes_async (GFile *file, |
1240 | GBytes *contents, |
1241 | const char *etag, |
1242 | gboolean make_backup, |
1243 | GFileCreateFlags flags, |
1244 | GCancellable *cancellable, |
1245 | GAsyncReadyCallback callback, |
1246 | gpointer user_data); |
1247 | GLIB_AVAILABLE_IN_ALL |
1248 | gboolean g_file_replace_contents_finish (GFile *file, |
1249 | GAsyncResult *res, |
1250 | char **new_etag, |
1251 | GError **error); |
1252 | |
1253 | GLIB_AVAILABLE_IN_ALL |
1254 | gboolean g_file_supports_thread_contexts (GFile *file); |
1255 | |
1256 | GLIB_AVAILABLE_IN_2_56 |
1257 | GBytes *g_file_load_bytes (GFile *file, |
1258 | GCancellable *cancellable, |
1259 | gchar **etag_out, |
1260 | GError **error); |
1261 | GLIB_AVAILABLE_IN_2_56 |
1262 | void g_file_load_bytes_async (GFile *file, |
1263 | GCancellable *cancellable, |
1264 | GAsyncReadyCallback callback, |
1265 | gpointer user_data); |
1266 | GLIB_AVAILABLE_IN_2_56 |
1267 | GBytes *g_file_load_bytes_finish (GFile *file, |
1268 | GAsyncResult *result, |
1269 | gchar **etag_out, |
1270 | GError **error); |
1271 | |
1272 | G_END_DECLS |
1273 | |
1274 | #endif /* __G_FILE_H__ */ |
1275 | |