gfile.h 78 KB

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