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