gfile.h 76 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253
  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 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 #GFileAttributes that can be set.
  76. * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttributes that can be set.
  77. * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
  78. * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
  79. * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
  80. * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
  81. * @set_attribute: Sets a #GFileAttribute.
  82. * @set_attributes_from_info: Sets a #GFileAttribute 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 an start operation. Since 2.22.
  136. * @stop_mountable: Stops a mountable. Since 2.22.
  137. * @stop_mountable_finish: Finishes an 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 an 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_ALL
  567. GFile * g_file_dup (GFile *file);
  568. GLIB_AVAILABLE_IN_ALL
  569. guint g_file_hash (gconstpointer file);
  570. GLIB_AVAILABLE_IN_ALL
  571. gboolean g_file_equal (GFile *file1,
  572. GFile *file2);
  573. GLIB_AVAILABLE_IN_ALL
  574. char * g_file_get_basename (GFile *file);
  575. GLIB_AVAILABLE_IN_ALL
  576. char * g_file_get_path (GFile *file);
  577. GLIB_AVAILABLE_IN_ALL
  578. char * g_file_get_uri (GFile *file);
  579. GLIB_AVAILABLE_IN_ALL
  580. char * g_file_get_parse_name (GFile *file);
  581. GLIB_AVAILABLE_IN_ALL
  582. GFile * g_file_get_parent (GFile *file);
  583. GLIB_AVAILABLE_IN_ALL
  584. gboolean g_file_has_parent (GFile *file,
  585. GFile *parent);
  586. GLIB_AVAILABLE_IN_ALL
  587. GFile * g_file_get_child (GFile *file,
  588. const char *name);
  589. GLIB_AVAILABLE_IN_ALL
  590. GFile * g_file_get_child_for_display_name (GFile *file,
  591. const char *display_name,
  592. GError **error);
  593. GLIB_AVAILABLE_IN_ALL
  594. gboolean g_file_has_prefix (GFile *file,
  595. GFile *prefix);
  596. GLIB_AVAILABLE_IN_ALL
  597. char * g_file_get_relative_path (GFile *parent,
  598. GFile *descendant);
  599. GLIB_AVAILABLE_IN_ALL
  600. GFile * g_file_resolve_relative_path (GFile *file,
  601. const char *relative_path);
  602. GLIB_AVAILABLE_IN_ALL
  603. gboolean g_file_is_native (GFile *file);
  604. GLIB_AVAILABLE_IN_ALL
  605. gboolean g_file_has_uri_scheme (GFile *file,
  606. const char *uri_scheme);
  607. GLIB_AVAILABLE_IN_ALL
  608. char * g_file_get_uri_scheme (GFile *file);
  609. GLIB_AVAILABLE_IN_ALL
  610. GFileInputStream * g_file_read (GFile *file,
  611. GCancellable *cancellable,
  612. GError **error);
  613. GLIB_AVAILABLE_IN_ALL
  614. void g_file_read_async (GFile *file,
  615. int io_priority,
  616. GCancellable *cancellable,
  617. GAsyncReadyCallback callback,
  618. gpointer user_data);
  619. GLIB_AVAILABLE_IN_ALL
  620. GFileInputStream * g_file_read_finish (GFile *file,
  621. GAsyncResult *res,
  622. GError **error);
  623. GLIB_AVAILABLE_IN_ALL
  624. GFileOutputStream * g_file_append_to (GFile *file,
  625. GFileCreateFlags flags,
  626. GCancellable *cancellable,
  627. GError **error);
  628. GLIB_AVAILABLE_IN_ALL
  629. GFileOutputStream * g_file_create (GFile *file,
  630. GFileCreateFlags flags,
  631. GCancellable *cancellable,
  632. GError **error);
  633. GLIB_AVAILABLE_IN_ALL
  634. GFileOutputStream * g_file_replace (GFile *file,
  635. const char *etag,
  636. gboolean make_backup,
  637. GFileCreateFlags flags,
  638. GCancellable *cancellable,
  639. GError **error);
  640. GLIB_AVAILABLE_IN_ALL
  641. void g_file_append_to_async (GFile *file,
  642. GFileCreateFlags flags,
  643. int io_priority,
  644. GCancellable *cancellable,
  645. GAsyncReadyCallback callback,
  646. gpointer user_data);
  647. GLIB_AVAILABLE_IN_ALL
  648. GFileOutputStream * g_file_append_to_finish (GFile *file,
  649. GAsyncResult *res,
  650. GError **error);
  651. GLIB_AVAILABLE_IN_ALL
  652. void g_file_create_async (GFile *file,
  653. GFileCreateFlags flags,
  654. int io_priority,
  655. GCancellable *cancellable,
  656. GAsyncReadyCallback callback,
  657. gpointer user_data);
  658. GLIB_AVAILABLE_IN_ALL
  659. GFileOutputStream * g_file_create_finish (GFile *file,
  660. GAsyncResult *res,
  661. GError **error);
  662. GLIB_AVAILABLE_IN_ALL
  663. void g_file_replace_async (GFile *file,
  664. const char *etag,
  665. gboolean make_backup,
  666. GFileCreateFlags flags,
  667. int io_priority,
  668. GCancellable *cancellable,
  669. GAsyncReadyCallback callback,
  670. gpointer user_data);
  671. GLIB_AVAILABLE_IN_ALL
  672. GFileOutputStream * g_file_replace_finish (GFile *file,
  673. GAsyncResult *res,
  674. GError **error);
  675. GLIB_AVAILABLE_IN_ALL
  676. GFileIOStream * g_file_open_readwrite (GFile *file,
  677. GCancellable *cancellable,
  678. GError **error);
  679. GLIB_AVAILABLE_IN_ALL
  680. void g_file_open_readwrite_async (GFile *file,
  681. int io_priority,
  682. GCancellable *cancellable,
  683. GAsyncReadyCallback callback,
  684. gpointer user_data);
  685. GLIB_AVAILABLE_IN_ALL
  686. GFileIOStream * g_file_open_readwrite_finish (GFile *file,
  687. GAsyncResult *res,
  688. GError **error);
  689. GLIB_AVAILABLE_IN_ALL
  690. GFileIOStream * g_file_create_readwrite (GFile *file,
  691. GFileCreateFlags flags,
  692. GCancellable *cancellable,
  693. GError **error);
  694. GLIB_AVAILABLE_IN_ALL
  695. void g_file_create_readwrite_async (GFile *file,
  696. GFileCreateFlags flags,
  697. int io_priority,
  698. GCancellable *cancellable,
  699. GAsyncReadyCallback callback,
  700. gpointer user_data);
  701. GLIB_AVAILABLE_IN_ALL
  702. GFileIOStream * g_file_create_readwrite_finish (GFile *file,
  703. GAsyncResult *res,
  704. GError **error);
  705. GLIB_AVAILABLE_IN_ALL
  706. GFileIOStream * g_file_replace_readwrite (GFile *file,
  707. const char *etag,
  708. gboolean make_backup,
  709. GFileCreateFlags flags,
  710. GCancellable *cancellable,
  711. GError **error);
  712. GLIB_AVAILABLE_IN_ALL
  713. void g_file_replace_readwrite_async (GFile *file,
  714. const char *etag,
  715. gboolean make_backup,
  716. GFileCreateFlags flags,
  717. int io_priority,
  718. GCancellable *cancellable,
  719. GAsyncReadyCallback callback,
  720. gpointer user_data);
  721. GLIB_AVAILABLE_IN_ALL
  722. GFileIOStream * g_file_replace_readwrite_finish (GFile *file,
  723. GAsyncResult *res,
  724. GError **error);
  725. GLIB_AVAILABLE_IN_ALL
  726. gboolean g_file_query_exists (GFile *file,
  727. GCancellable *cancellable);
  728. GLIB_AVAILABLE_IN_ALL
  729. GFileType g_file_query_file_type (GFile *file,
  730. GFileQueryInfoFlags flags,
  731. GCancellable *cancellable);
  732. GLIB_AVAILABLE_IN_ALL
  733. GFileInfo * g_file_query_info (GFile *file,
  734. const char *attributes,
  735. GFileQueryInfoFlags flags,
  736. GCancellable *cancellable,
  737. GError **error);
  738. GLIB_AVAILABLE_IN_ALL
  739. void g_file_query_info_async (GFile *file,
  740. const char *attributes,
  741. GFileQueryInfoFlags flags,
  742. int io_priority,
  743. GCancellable *cancellable,
  744. GAsyncReadyCallback callback,
  745. gpointer user_data);
  746. GLIB_AVAILABLE_IN_ALL
  747. GFileInfo * g_file_query_info_finish (GFile *file,
  748. GAsyncResult *res,
  749. GError **error);
  750. GLIB_AVAILABLE_IN_ALL
  751. GFileInfo * g_file_query_filesystem_info (GFile *file,
  752. const char *attributes,
  753. GCancellable *cancellable,
  754. GError **error);
  755. GLIB_AVAILABLE_IN_ALL
  756. void g_file_query_filesystem_info_async (GFile *file,
  757. const char *attributes,
  758. int io_priority,
  759. GCancellable *cancellable,
  760. GAsyncReadyCallback callback,
  761. gpointer user_data);
  762. GLIB_AVAILABLE_IN_ALL
  763. GFileInfo * g_file_query_filesystem_info_finish (GFile *file,
  764. GAsyncResult *res,
  765. GError **error);
  766. GLIB_AVAILABLE_IN_ALL
  767. GMount * g_file_find_enclosing_mount (GFile *file,
  768. GCancellable *cancellable,
  769. GError **error);
  770. GLIB_AVAILABLE_IN_ALL
  771. void g_file_find_enclosing_mount_async (GFile *file,
  772. int io_priority,
  773. GCancellable *cancellable,
  774. GAsyncReadyCallback callback,
  775. gpointer user_data);
  776. GLIB_AVAILABLE_IN_ALL
  777. GMount * g_file_find_enclosing_mount_finish (GFile *file,
  778. GAsyncResult *res,
  779. GError **error);
  780. GLIB_AVAILABLE_IN_ALL
  781. GFileEnumerator * g_file_enumerate_children (GFile *file,
  782. const char *attributes,
  783. GFileQueryInfoFlags flags,
  784. GCancellable *cancellable,
  785. GError **error);
  786. GLIB_AVAILABLE_IN_ALL
  787. void g_file_enumerate_children_async (GFile *file,
  788. const char *attributes,
  789. GFileQueryInfoFlags flags,
  790. int io_priority,
  791. GCancellable *cancellable,
  792. GAsyncReadyCallback callback,
  793. gpointer user_data);
  794. GLIB_AVAILABLE_IN_ALL
  795. GFileEnumerator * g_file_enumerate_children_finish (GFile *file,
  796. GAsyncResult *res,
  797. GError **error);
  798. GLIB_AVAILABLE_IN_ALL
  799. GFile * g_file_set_display_name (GFile *file,
  800. const char *display_name,
  801. GCancellable *cancellable,
  802. GError **error);
  803. GLIB_AVAILABLE_IN_ALL
  804. void g_file_set_display_name_async (GFile *file,
  805. const char *display_name,
  806. int io_priority,
  807. GCancellable *cancellable,
  808. GAsyncReadyCallback callback,
  809. gpointer user_data);
  810. GLIB_AVAILABLE_IN_ALL
  811. GFile * g_file_set_display_name_finish (GFile *file,
  812. GAsyncResult *res,
  813. GError **error);
  814. GLIB_AVAILABLE_IN_ALL
  815. gboolean g_file_delete (GFile *file,
  816. GCancellable *cancellable,
  817. GError **error);
  818. GLIB_AVAILABLE_IN_2_34
  819. void g_file_delete_async (GFile *file,
  820. int io_priority,
  821. GCancellable *cancellable,
  822. GAsyncReadyCallback callback,
  823. gpointer user_data);
  824. GLIB_AVAILABLE_IN_2_34
  825. gboolean g_file_delete_finish (GFile *file,
  826. GAsyncResult *result,
  827. GError **error);
  828. GLIB_AVAILABLE_IN_ALL
  829. gboolean g_file_trash (GFile *file,
  830. GCancellable *cancellable,
  831. GError **error);
  832. GLIB_AVAILABLE_IN_2_38
  833. void g_file_trash_async (GFile *file,
  834. int io_priority,
  835. GCancellable *cancellable,
  836. GAsyncReadyCallback callback,
  837. gpointer user_data);
  838. GLIB_AVAILABLE_IN_2_38
  839. gboolean g_file_trash_finish (GFile *file,
  840. GAsyncResult *result,
  841. GError **error);
  842. GLIB_AVAILABLE_IN_ALL
  843. gboolean g_file_copy (GFile *source,
  844. GFile *destination,
  845. GFileCopyFlags flags,
  846. GCancellable *cancellable,
  847. GFileProgressCallback progress_callback,
  848. gpointer progress_callback_data,
  849. GError **error);
  850. GLIB_AVAILABLE_IN_ALL
  851. void g_file_copy_async (GFile *source,
  852. GFile *destination,
  853. GFileCopyFlags flags,
  854. int io_priority,
  855. GCancellable *cancellable,
  856. GFileProgressCallback progress_callback,
  857. gpointer progress_callback_data,
  858. GAsyncReadyCallback callback,
  859. gpointer user_data);
  860. GLIB_AVAILABLE_IN_ALL
  861. gboolean g_file_copy_finish (GFile *file,
  862. GAsyncResult *res,
  863. GError **error);
  864. GLIB_AVAILABLE_IN_ALL
  865. gboolean g_file_move (GFile *source,
  866. GFile *destination,
  867. GFileCopyFlags flags,
  868. GCancellable *cancellable,
  869. GFileProgressCallback progress_callback,
  870. gpointer progress_callback_data,
  871. GError **error);
  872. GLIB_AVAILABLE_IN_ALL
  873. gboolean g_file_make_directory (GFile *file,
  874. GCancellable *cancellable,
  875. GError **error);
  876. GLIB_AVAILABLE_IN_2_38
  877. void g_file_make_directory_async (GFile *file,
  878. int io_priority,
  879. GCancellable *cancellable,
  880. GAsyncReadyCallback callback,
  881. gpointer user_data);
  882. GLIB_AVAILABLE_IN_2_38
  883. gboolean g_file_make_directory_finish (GFile *file,
  884. GAsyncResult *result,
  885. GError **error);
  886. GLIB_AVAILABLE_IN_ALL
  887. gboolean g_file_make_directory_with_parents (GFile *file,
  888. GCancellable *cancellable,
  889. GError **error);
  890. GLIB_AVAILABLE_IN_ALL
  891. gboolean g_file_make_symbolic_link (GFile *file,
  892. const char *symlink_value,
  893. GCancellable *cancellable,
  894. GError **error);
  895. GLIB_AVAILABLE_IN_ALL
  896. GFileAttributeInfoList *g_file_query_settable_attributes (GFile *file,
  897. GCancellable *cancellable,
  898. GError **error);
  899. GLIB_AVAILABLE_IN_ALL
  900. GFileAttributeInfoList *g_file_query_writable_namespaces (GFile *file,
  901. GCancellable *cancellable,
  902. GError **error);
  903. GLIB_AVAILABLE_IN_ALL
  904. gboolean g_file_set_attribute (GFile *file,
  905. const char *attribute,
  906. GFileAttributeType type,
  907. gpointer value_p,
  908. GFileQueryInfoFlags flags,
  909. GCancellable *cancellable,
  910. GError **error);
  911. GLIB_AVAILABLE_IN_ALL
  912. gboolean g_file_set_attributes_from_info (GFile *file,
  913. GFileInfo *info,
  914. GFileQueryInfoFlags flags,
  915. GCancellable *cancellable,
  916. GError **error);
  917. GLIB_AVAILABLE_IN_ALL
  918. void g_file_set_attributes_async (GFile *file,
  919. GFileInfo *info,
  920. GFileQueryInfoFlags flags,
  921. int io_priority,
  922. GCancellable *cancellable,
  923. GAsyncReadyCallback callback,
  924. gpointer user_data);
  925. GLIB_AVAILABLE_IN_ALL
  926. gboolean g_file_set_attributes_finish (GFile *file,
  927. GAsyncResult *result,
  928. GFileInfo **info,
  929. GError **error);
  930. GLIB_AVAILABLE_IN_ALL
  931. gboolean g_file_set_attribute_string (GFile *file,
  932. const char *attribute,
  933. const char *value,
  934. GFileQueryInfoFlags flags,
  935. GCancellable *cancellable,
  936. GError **error);
  937. GLIB_AVAILABLE_IN_ALL
  938. gboolean g_file_set_attribute_byte_string (GFile *file,
  939. const char *attribute,
  940. const char *value,
  941. GFileQueryInfoFlags flags,
  942. GCancellable *cancellable,
  943. GError **error);
  944. GLIB_AVAILABLE_IN_ALL
  945. gboolean g_file_set_attribute_uint32 (GFile *file,
  946. const char *attribute,
  947. guint32 value,
  948. GFileQueryInfoFlags flags,
  949. GCancellable *cancellable,
  950. GError **error);
  951. GLIB_AVAILABLE_IN_ALL
  952. gboolean g_file_set_attribute_int32 (GFile *file,
  953. const char *attribute,
  954. gint32 value,
  955. GFileQueryInfoFlags flags,
  956. GCancellable *cancellable,
  957. GError **error);
  958. GLIB_AVAILABLE_IN_ALL
  959. gboolean g_file_set_attribute_uint64 (GFile *file,
  960. const char *attribute,
  961. guint64 value,
  962. GFileQueryInfoFlags flags,
  963. GCancellable *cancellable,
  964. GError **error);
  965. GLIB_AVAILABLE_IN_ALL
  966. gboolean g_file_set_attribute_int64 (GFile *file,
  967. const char *attribute,
  968. gint64 value,
  969. GFileQueryInfoFlags flags,
  970. GCancellable *cancellable,
  971. GError **error);
  972. GLIB_AVAILABLE_IN_ALL
  973. void g_file_mount_enclosing_volume (GFile *location,
  974. GMountMountFlags flags,
  975. GMountOperation *mount_operation,
  976. GCancellable *cancellable,
  977. GAsyncReadyCallback callback,
  978. gpointer user_data);
  979. GLIB_AVAILABLE_IN_ALL
  980. gboolean g_file_mount_enclosing_volume_finish (GFile *location,
  981. GAsyncResult *result,
  982. GError **error);
  983. GLIB_AVAILABLE_IN_ALL
  984. void g_file_mount_mountable (GFile *file,
  985. GMountMountFlags flags,
  986. GMountOperation *mount_operation,
  987. GCancellable *cancellable,
  988. GAsyncReadyCallback callback,
  989. gpointer user_data);
  990. GLIB_AVAILABLE_IN_ALL
  991. GFile * g_file_mount_mountable_finish (GFile *file,
  992. GAsyncResult *result,
  993. GError **error);
  994. GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation)
  995. void g_file_unmount_mountable (GFile *file,
  996. GMountUnmountFlags flags,
  997. GCancellable *cancellable,
  998. GAsyncReadyCallback callback,
  999. gpointer user_data);
  1000. GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation_finish)
  1001. gboolean g_file_unmount_mountable_finish (GFile *file,
  1002. GAsyncResult *result,
  1003. GError **error);
  1004. GLIB_AVAILABLE_IN_ALL
  1005. void g_file_unmount_mountable_with_operation (GFile *file,
  1006. GMountUnmountFlags flags,
  1007. GMountOperation *mount_operation,
  1008. GCancellable *cancellable,
  1009. GAsyncReadyCallback callback,
  1010. gpointer user_data);
  1011. GLIB_AVAILABLE_IN_ALL
  1012. gboolean g_file_unmount_mountable_with_operation_finish (GFile *file,
  1013. GAsyncResult *result,
  1014. GError **error);
  1015. GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation)
  1016. void g_file_eject_mountable (GFile *file,
  1017. GMountUnmountFlags flags,
  1018. GCancellable *cancellable,
  1019. GAsyncReadyCallback callback,
  1020. gpointer user_data);
  1021. GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation_finish)
  1022. gboolean g_file_eject_mountable_finish (GFile *file,
  1023. GAsyncResult *result,
  1024. GError **error);
  1025. GLIB_AVAILABLE_IN_ALL
  1026. void g_file_eject_mountable_with_operation (GFile *file,
  1027. GMountUnmountFlags flags,
  1028. GMountOperation *mount_operation,
  1029. GCancellable *cancellable,
  1030. GAsyncReadyCallback callback,
  1031. gpointer user_data);
  1032. GLIB_AVAILABLE_IN_ALL
  1033. gboolean g_file_eject_mountable_with_operation_finish (GFile *file,
  1034. GAsyncResult *result,
  1035. GError **error);
  1036. GLIB_AVAILABLE_IN_ALL
  1037. gboolean g_file_copy_attributes (GFile *source,
  1038. GFile *destination,
  1039. GFileCopyFlags flags,
  1040. GCancellable *cancellable,
  1041. GError **error);
  1042. GLIB_AVAILABLE_IN_ALL
  1043. GFileMonitor* g_file_monitor_directory (GFile *file,
  1044. GFileMonitorFlags flags,
  1045. GCancellable *cancellable,
  1046. GError **error);
  1047. GLIB_AVAILABLE_IN_ALL
  1048. GFileMonitor* g_file_monitor_file (GFile *file,
  1049. GFileMonitorFlags flags,
  1050. GCancellable *cancellable,
  1051. GError **error);
  1052. GLIB_AVAILABLE_IN_ALL
  1053. GFileMonitor* g_file_monitor (GFile *file,
  1054. GFileMonitorFlags flags,
  1055. GCancellable *cancellable,
  1056. GError **error);
  1057. GLIB_AVAILABLE_IN_2_38
  1058. gboolean g_file_measure_disk_usage (GFile *file,
  1059. GFileMeasureFlags flags,
  1060. GCancellable *cancellable,
  1061. GFileMeasureProgressCallback progress_callback,
  1062. gpointer progress_data,
  1063. guint64 *disk_usage,
  1064. guint64 *num_dirs,
  1065. guint64 *num_files,
  1066. GError **error);
  1067. GLIB_AVAILABLE_IN_2_38
  1068. void g_file_measure_disk_usage_async (GFile *file,
  1069. GFileMeasureFlags flags,
  1070. gint io_priority,
  1071. GCancellable *cancellable,
  1072. GFileMeasureProgressCallback progress_callback,
  1073. gpointer progress_data,
  1074. GAsyncReadyCallback callback,
  1075. gpointer user_data);
  1076. GLIB_AVAILABLE_IN_2_38
  1077. gboolean g_file_measure_disk_usage_finish (GFile *file,
  1078. GAsyncResult *result,
  1079. guint64 *disk_usage,
  1080. guint64 *num_dirs,
  1081. guint64 *num_files,
  1082. GError **error);
  1083. GLIB_AVAILABLE_IN_ALL
  1084. void g_file_start_mountable (GFile *file,
  1085. GDriveStartFlags flags,
  1086. GMountOperation *start_operation,
  1087. GCancellable *cancellable,
  1088. GAsyncReadyCallback callback,
  1089. gpointer user_data);
  1090. GLIB_AVAILABLE_IN_ALL
  1091. gboolean g_file_start_mountable_finish (GFile *file,
  1092. GAsyncResult *result,
  1093. GError **error);
  1094. GLIB_AVAILABLE_IN_ALL
  1095. void g_file_stop_mountable (GFile *file,
  1096. GMountUnmountFlags flags,
  1097. GMountOperation *mount_operation,
  1098. GCancellable *cancellable,
  1099. GAsyncReadyCallback callback,
  1100. gpointer user_data);
  1101. GLIB_AVAILABLE_IN_ALL
  1102. gboolean g_file_stop_mountable_finish (GFile *file,
  1103. GAsyncResult *result,
  1104. GError **error);
  1105. GLIB_AVAILABLE_IN_ALL
  1106. void g_file_poll_mountable (GFile *file,
  1107. GCancellable *cancellable,
  1108. GAsyncReadyCallback callback,
  1109. gpointer user_data);
  1110. GLIB_AVAILABLE_IN_ALL
  1111. gboolean g_file_poll_mountable_finish (GFile *file,
  1112. GAsyncResult *result,
  1113. GError **error);
  1114. /* Utilities */
  1115. GLIB_AVAILABLE_IN_ALL
  1116. GAppInfo *g_file_query_default_handler (GFile *file,
  1117. GCancellable *cancellable,
  1118. GError **error);
  1119. GLIB_AVAILABLE_IN_ALL
  1120. gboolean g_file_load_contents (GFile *file,
  1121. GCancellable *cancellable,
  1122. char **contents,
  1123. gsize *length,
  1124. char **etag_out,
  1125. GError **error);
  1126. GLIB_AVAILABLE_IN_ALL
  1127. void g_file_load_contents_async (GFile *file,
  1128. GCancellable *cancellable,
  1129. GAsyncReadyCallback callback,
  1130. gpointer user_data);
  1131. GLIB_AVAILABLE_IN_ALL
  1132. gboolean g_file_load_contents_finish (GFile *file,
  1133. GAsyncResult *res,
  1134. char **contents,
  1135. gsize *length,
  1136. char **etag_out,
  1137. GError **error);
  1138. GLIB_AVAILABLE_IN_ALL
  1139. void g_file_load_partial_contents_async (GFile *file,
  1140. GCancellable *cancellable,
  1141. GFileReadMoreCallback read_more_callback,
  1142. GAsyncReadyCallback callback,
  1143. gpointer user_data);
  1144. GLIB_AVAILABLE_IN_ALL
  1145. gboolean g_file_load_partial_contents_finish (GFile *file,
  1146. GAsyncResult *res,
  1147. char **contents,
  1148. gsize *length,
  1149. char **etag_out,
  1150. GError **error);
  1151. GLIB_AVAILABLE_IN_ALL
  1152. gboolean g_file_replace_contents (GFile *file,
  1153. const char *contents,
  1154. gsize length,
  1155. const char *etag,
  1156. gboolean make_backup,
  1157. GFileCreateFlags flags,
  1158. char **new_etag,
  1159. GCancellable *cancellable,
  1160. GError **error);
  1161. GLIB_AVAILABLE_IN_ALL
  1162. void g_file_replace_contents_async (GFile *file,
  1163. const char *contents,
  1164. gsize length,
  1165. const char *etag,
  1166. gboolean make_backup,
  1167. GFileCreateFlags flags,
  1168. GCancellable *cancellable,
  1169. GAsyncReadyCallback callback,
  1170. gpointer user_data);
  1171. GLIB_AVAILABLE_IN_2_40
  1172. void g_file_replace_contents_bytes_async (GFile *file,
  1173. GBytes *contents,
  1174. const char *etag,
  1175. gboolean make_backup,
  1176. GFileCreateFlags flags,
  1177. GCancellable *cancellable,
  1178. GAsyncReadyCallback callback,
  1179. gpointer user_data);
  1180. GLIB_AVAILABLE_IN_ALL
  1181. gboolean g_file_replace_contents_finish (GFile *file,
  1182. GAsyncResult *res,
  1183. char **new_etag,
  1184. GError **error);
  1185. GLIB_AVAILABLE_IN_ALL
  1186. gboolean g_file_supports_thread_contexts (GFile *file);
  1187. G_END_DECLS
  1188. #endif /* __G_FILE_H__ */