gfile.h 75 KB

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