gfile.h 84 KB

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