Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-16 09:12:10

0001 /* GIO - GLib Input, Output and Streaming Library
0002  *
0003  * Copyright (C) 2006-2007 Red Hat, Inc.
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-or-later
0006  *
0007  * This library is free software; you can redistribute it and/or
0008  * modify it under the terms of the GNU Lesser General Public
0009  * License as published by the Free Software Foundation; either
0010  * version 2.1 of the License, or (at your option) any later version.
0011  *
0012  * This library is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  * Lesser General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Lesser General
0018  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
0019  *
0020  * Author: Alexander Larsson <alexl@redhat.com>
0021  */
0022 
0023 #ifndef __G_FILE_H__
0024 #define __G_FILE_H__
0025 
0026 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0027 #error "Only <gio/gio.h> can be included directly."
0028 #endif
0029 
0030 #include <gio/giotypes.h>
0031 
0032 G_BEGIN_DECLS
0033 
0034 #define G_TYPE_FILE            (g_file_get_type ())
0035 #define G_FILE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE, GFile))
0036 #define G_IS_FILE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE))
0037 #define G_FILE_GET_IFACE(obj)  (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE, GFileIface))
0038 
0039 typedef struct _GFileIface          GFileIface;
0040 
0041 
0042 /**
0043  * GFileIface:
0044  * @g_iface: The parent interface.
0045  * @dup: Duplicates a #GFile.
0046  * @hash: Creates a hash of a #GFile.
0047  * @equal: Checks equality of two given #GFiles.
0048  * @is_native: Checks to see if a file is native to the system.
0049  * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
0050  * @get_uri_scheme: Gets the URI scheme for a #GFile.
0051  * @get_basename: Gets the basename for a given #GFile.
0052  * @get_path: Gets the current path within a #GFile.
0053  * @get_uri: Gets a URI for the path within a #GFile.
0054  * @get_parse_name: Gets the parsed name for the #GFile.
0055  * @get_parent: Gets the parent directory for the #GFile.
0056  * @prefix_matches: Checks whether a #GFile contains a specified file.
0057  * @get_relative_path: Gets the path for a #GFile relative to a given path.
0058  * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
0059  * @get_child_for_display_name: Gets the child #GFile for a given display name.
0060  * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
0061  * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
0062  * @enumerate_children_finish: Finishes asynchronously enumerating the children.
0063  * @query_info: Gets the #GFileInfo for a #GFile.
0064  * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
0065  * @query_info_finish: Finishes an asynchronous query info operation.
0066  * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
0067  * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
0068  * @query_filesystem_info_finish: Finishes asynchronously getting the file system info.
0069  * @find_enclosing_mount: Gets a #GMount for the #GFile.
0070  * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
0071  * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
0072  * @set_display_name: Sets the display name for a #GFile.
0073  * @set_display_name_async: Asynchronously sets a #GFile's display name.
0074  * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
0075  * @query_settable_attributes: Returns a list of #GFileAttributeInfos that can be set.
0076  * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttributeInfos that can be set.
0077  * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
0078  * @query_writable_namespaces: Returns a list of #GFileAttributeInfo namespaces that are writable.
0079  * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttributeInfo namespaces that are writable.
0080  * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
0081  * @set_attribute: Sets a #GFileAttributeInfo.
0082  * @set_attributes_from_info: Sets a #GFileAttributeInfo with information from a #GFileInfo.
0083  * @set_attributes_async: Asynchronously sets a file's attributes.
0084  * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
0085  * @read_fn: Reads a file asynchronously.
0086  * @read_async: Asynchronously reads a file.
0087  * @read_finish: Finishes asynchronously reading a file.
0088  * @append_to: Writes to the end of a file.
0089  * @append_to_async: Asynchronously writes to the end of a file.
0090  * @append_to_finish: Finishes an asynchronous file append operation.
0091  * @create: Creates a new file.
0092  * @create_async: Asynchronously creates a file.
0093  * @create_finish: Finishes asynchronously creating a file.
0094  * @replace: Replaces the contents of a file.
0095  * @replace_async: Asynchronously replaces the contents of a file.
0096  * @replace_finish: Finishes asynchronously replacing a file.
0097  * @delete_file: Deletes a file.
0098  * @delete_file_async: Asynchronously deletes a file.
0099  * @delete_file_finish: Finishes an asynchronous delete.
0100  * @trash: Sends a #GFile to the Trash location.
0101  * @trash_async: Asynchronously sends a #GFile to the Trash location.
0102  * @trash_finish: Finishes an asynchronous file trashing operation.
0103  * @make_directory: Makes a directory.
0104  * @make_directory_async: Asynchronously makes a directory.
0105  * @make_directory_finish: Finishes making a directory asynchronously.
0106  * @make_symbolic_link: (nullable): Makes a symbolic link. %NULL if symbolic
0107  *    links are unsupported.
0108  * @make_symbolic_link_async: Asynchronously makes a symbolic link
0109  * @make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
0110  * @copy: (nullable): Copies a file. %NULL if copying is unsupported, which will
0111  *     cause `GFile` to use a fallback copy method where it reads from the
0112  *     source and writes to the destination.
0113  * @copy_async: Asynchronously copies a file.
0114  * @copy_finish: Finishes an asynchronous copy operation.
0115  * @move: Moves a file.
0116  * @move_async: Asynchronously moves a file. Since: 2.72
0117  * @move_finish: Finishes an asynchronous move operation. Since: 2.72
0118  * @mount_mountable: Mounts a mountable object.
0119  * @mount_mountable_finish: Finishes a mounting operation.
0120  * @unmount_mountable: Unmounts a mountable object.
0121  * @unmount_mountable_finish: Finishes an unmount operation.
0122  * @eject_mountable: Ejects a mountable.
0123  * @eject_mountable_finish: Finishes an eject operation.
0124  * @mount_enclosing_volume: Mounts a specified location.
0125  * @mount_enclosing_volume_finish: Finishes mounting a specified location.
0126  * @monitor_dir: Creates a #GFileMonitor for the location.
0127  * @monitor_file: Creates a #GFileMonitor for the location.
0128  * @open_readwrite: Open file read/write. Since 2.22.
0129  * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22.
0130  * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22.
0131  * @create_readwrite: Creates file read/write. Since 2.22.
0132  * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22.
0133  * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22.
0134  * @replace_readwrite: Replaces file read/write. Since 2.22.
0135  * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22.
0136  * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22.
0137  * @start_mountable: Starts a mountable object. Since 2.22.
0138  * @start_mountable_finish: Finishes a start operation. Since 2.22.
0139  * @stop_mountable: Stops a mountable. Since 2.22.
0140  * @stop_mountable_finish: Finishes a stop operation. Since 2.22.
0141  * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22.
0142  * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22.
0143  * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22.
0144  * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22.
0145  * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
0146  * @poll_mountable: Polls a mountable object for media changes. Since 2.22.
0147  * @poll_mountable_finish: Finishes a poll operation for media changes. Since 2.22.
0148  * @measure_disk_usage: Recursively measures the disk usage of @file. Since 2.38
0149  * @measure_disk_usage_async: Asynchronously recursively measures the disk usage of @file. Since 2.38
0150  * @measure_disk_usage_finish: Finishes an asynchronous recursive measurement of the disk usage of @file. Since 2.38
0151  * @query_exists: Queries whether a file exists. Since 2.84
0152  *
0153  * An interface for writing VFS file handles.
0154  **/
0155 struct _GFileIface
0156 {
0157   GTypeInterface g_iface;
0158 
0159   /* Virtual Table */
0160 
0161   GFile *             (* dup)                         (GFile         *file);
0162   guint               (* hash)                        (GFile         *file);
0163   gboolean            (* equal)                       (GFile         *file1,
0164                                                        GFile         *file2);
0165   gboolean            (* is_native)                   (GFile         *file);
0166   gboolean            (* has_uri_scheme)              (GFile         *file,
0167                                                        const char    *uri_scheme);
0168   char *              (* get_uri_scheme)              (GFile         *file);
0169   char *              (* get_basename)                (GFile         *file);
0170   char *              (* get_path)                    (GFile         *file);
0171   char *              (* get_uri)                     (GFile         *file);
0172   char *              (* get_parse_name)              (GFile         *file);
0173   GFile *             (* get_parent)                  (GFile         *file);
0174   gboolean            (* prefix_matches)              (GFile         *prefix,
0175                                                        GFile         *file);
0176   char *              (* get_relative_path)           (GFile         *parent,
0177                                                        GFile         *descendant);
0178   GFile *             (* resolve_relative_path)       (GFile        *file,
0179                                                        const char   *relative_path);
0180   GFile *             (* get_child_for_display_name)  (GFile        *file,
0181                                                        const char   *display_name,
0182                                                        GError      **error);
0183 
0184   GFileEnumerator *   (* enumerate_children)          (GFile                *file,
0185                                                        const char           *attributes,
0186                                                        GFileQueryInfoFlags   flags,
0187                                                        GCancellable         *cancellable,
0188                                                        GError              **error);
0189   void                (* enumerate_children_async)    (GFile                *file,
0190                                                        const char           *attributes,
0191                                                        GFileQueryInfoFlags   flags,
0192                                                        int                   io_priority,
0193                                                        GCancellable         *cancellable,
0194                                                        GAsyncReadyCallback   callback,
0195                                                        gpointer              user_data);
0196   GFileEnumerator *   (* enumerate_children_finish)   (GFile                *file,
0197                                                        GAsyncResult         *res,
0198                                                        GError              **error);
0199 
0200   GFileInfo *         (* query_info)                  (GFile                *file,
0201                                                        const char           *attributes,
0202                                                        GFileQueryInfoFlags   flags,
0203                                                        GCancellable         *cancellable,
0204                                                        GError              **error);
0205   void                (* query_info_async)            (GFile                *file,
0206                                                        const char           *attributes,
0207                                                        GFileQueryInfoFlags   flags,
0208                                                        int                   io_priority,
0209                                                        GCancellable         *cancellable,
0210                                                        GAsyncReadyCallback   callback,
0211                                                        gpointer              user_data);
0212   GFileInfo *         (* query_info_finish)           (GFile                *file,
0213                                                        GAsyncResult         *res,
0214                                                        GError              **error);
0215 
0216   GFileInfo *         (* query_filesystem_info)       (GFile                *file,
0217                                                        const char           *attributes,
0218                                                        GCancellable         *cancellable,
0219                                                        GError              **error);
0220   void                (* query_filesystem_info_async) (GFile                *file,
0221                                                        const char           *attributes,
0222                                                        int                   io_priority,
0223                                                        GCancellable         *cancellable,
0224                                                        GAsyncReadyCallback   callback,
0225                                                        gpointer              user_data);
0226   GFileInfo *         (* query_filesystem_info_finish)(GFile                *file,
0227                                                        GAsyncResult         *res,
0228                                                        GError              **error);
0229 
0230   GMount *            (* find_enclosing_mount)        (GFile                *file,
0231                                                        GCancellable         *cancellable,
0232                                                        GError              **error);
0233   void                (* find_enclosing_mount_async)  (GFile                *file,
0234                                                        int                   io_priority,
0235                                                        GCancellable         *cancellable,
0236                                                        GAsyncReadyCallback   callback,
0237                                                        gpointer              user_data);
0238   GMount *            (* find_enclosing_mount_finish) (GFile                *file,
0239                                                        GAsyncResult         *res,
0240                                                        GError              **error);
0241 
0242   GFile *             (* set_display_name)            (GFile                *file,
0243                                                        const char           *display_name,
0244                                                        GCancellable         *cancellable,
0245                                                        GError              **error);
0246   void                (* set_display_name_async)      (GFile                *file,
0247                                                        const char           *display_name,
0248                                                        int                   io_priority,
0249                                                        GCancellable         *cancellable,
0250                                                        GAsyncReadyCallback   callback,
0251                                                        gpointer              user_data);
0252   GFile *             (* set_display_name_finish)     (GFile                *file,
0253                                                        GAsyncResult         *res,
0254                                                        GError              **error);
0255 
0256   GFileAttributeInfoList * (* query_settable_attributes)    (GFile          *file,
0257                                                              GCancellable   *cancellable,
0258                                                              GError        **error);
0259   void                (* _query_settable_attributes_async)  (void);
0260   void                (* _query_settable_attributes_finish) (void);
0261 
0262   GFileAttributeInfoList * (* query_writable_namespaces)    (GFile          *file,
0263                                                              GCancellable   *cancellable,
0264                                                              GError        **error);
0265   void                (* _query_writable_namespaces_async)  (void);
0266   void                (* _query_writable_namespaces_finish) (void);
0267 
0268   gboolean            (* set_attribute)               (GFile                *file,
0269                                                        const char           *attribute,
0270                                                        GFileAttributeType    type,
0271                                                        gpointer              value_p,
0272                                                        GFileQueryInfoFlags   flags,
0273                                                        GCancellable         *cancellable,
0274                                                        GError              **error);
0275   gboolean            (* set_attributes_from_info)    (GFile                *file,
0276                                                        GFileInfo            *info,
0277                                                        GFileQueryInfoFlags   flags,
0278                                                        GCancellable         *cancellable,
0279                                                        GError              **error);
0280   void                (* set_attributes_async)        (GFile                *file,
0281                                                        GFileInfo            *info,
0282                                                        GFileQueryInfoFlags   flags,
0283                                                        int                   io_priority,
0284                                                        GCancellable         *cancellable,
0285                                                        GAsyncReadyCallback   callback,
0286                                                        gpointer              user_data);
0287   gboolean            (* set_attributes_finish)       (GFile                *file,
0288                                                        GAsyncResult         *result,
0289                                                        GFileInfo           **info,
0290                                                        GError              **error);
0291 
0292   GFileInputStream *  (* read_fn)                     (GFile                *file,
0293                                                        GCancellable         *cancellable,
0294                                                        GError              **error);
0295   void                (* read_async)                  (GFile                *file,
0296                                                        int                   io_priority,
0297                                                        GCancellable         *cancellable,
0298                                                        GAsyncReadyCallback   callback,
0299                                                        gpointer              user_data);
0300   GFileInputStream *  (* read_finish)                 (GFile                *file,
0301                                                        GAsyncResult         *res,
0302                                                        GError              **error);
0303 
0304   GFileOutputStream * (* append_to)                   (GFile                *file,
0305                                                        GFileCreateFlags      flags,
0306                                                        GCancellable         *cancellable,
0307                                                        GError              **error);
0308   void                (* append_to_async)             (GFile                *file,
0309                                                        GFileCreateFlags      flags,
0310                                                        int                   io_priority,
0311                                                        GCancellable         *cancellable,
0312                                                        GAsyncReadyCallback   callback,
0313                                                        gpointer              user_data);
0314   GFileOutputStream * (* append_to_finish)            (GFile                *file,
0315                                                        GAsyncResult         *res,
0316                                                        GError              **error);
0317 
0318   GFileOutputStream * (* create)                      (GFile                *file,
0319                                                        GFileCreateFlags      flags,
0320                                                        GCancellable         *cancellable,
0321                                                        GError              **error);
0322   void                (* create_async)                (GFile                *file,
0323                                                        GFileCreateFlags      flags,
0324                                                        int                   io_priority,
0325                                                        GCancellable         *cancellable,
0326                                                        GAsyncReadyCallback   callback,
0327                                                        gpointer              user_data);
0328   GFileOutputStream * (* create_finish)               (GFile                *file,
0329                                                        GAsyncResult         *res,
0330                                                        GError              **error);
0331 
0332   GFileOutputStream * (* replace)                     (GFile                *file,
0333                                                        const char           *etag,
0334                                                        gboolean              make_backup,
0335                                                        GFileCreateFlags      flags,
0336                                                        GCancellable         *cancellable,
0337                                                        GError              **error);
0338   void                (* replace_async)               (GFile                *file,
0339                                                        const char           *etag,
0340                                                        gboolean              make_backup,
0341                                                        GFileCreateFlags      flags,
0342                                                        int                   io_priority,
0343                                                        GCancellable         *cancellable,
0344                                                        GAsyncReadyCallback   callback,
0345                                                        gpointer              user_data);
0346   GFileOutputStream * (* replace_finish)              (GFile                *file,
0347                                                        GAsyncResult         *res,
0348                                                        GError              **error);
0349 
0350   gboolean            (* delete_file)                 (GFile                *file,
0351                                                        GCancellable         *cancellable,
0352                                                        GError              **error);
0353   void                (* delete_file_async)           (GFile                *file,
0354                                int                   io_priority,
0355                                GCancellable         *cancellable,
0356                                GAsyncReadyCallback   callback,
0357                                gpointer              user_data);
0358   gboolean            (* delete_file_finish)          (GFile                *file,
0359                                GAsyncResult         *result,
0360                                GError              **error);
0361 
0362   gboolean            (* trash)                       (GFile                *file,
0363                                                        GCancellable         *cancellable,
0364                                                        GError              **error);
0365   void                (* trash_async)                 (GFile                *file,
0366                                int                   io_priority,
0367                                GCancellable         *cancellable,
0368                                GAsyncReadyCallback   callback,
0369                                gpointer              user_data);
0370   gboolean            (* trash_finish)                (GFile                *file,
0371                                GAsyncResult         *result,
0372                                GError              **error);
0373 
0374   gboolean            (* make_directory)              (GFile                *file,
0375                                                        GCancellable         *cancellable,
0376                                                        GError              **error);
0377   void                (* make_directory_async)        (GFile                *file,
0378                                                        int                   io_priority,
0379                                                        GCancellable         *cancellable,
0380                                                        GAsyncReadyCallback   callback,
0381                                                        gpointer              user_data);
0382   gboolean            (* make_directory_finish)       (GFile                *file,
0383                                                        GAsyncResult         *result,
0384                                                        GError              **error);
0385 
0386   gboolean            (* make_symbolic_link)          (GFile                *file,
0387                                                        const char           *symlink_value,
0388                                                        GCancellable         *cancellable,
0389                                                        GError              **error);
0390   void                (* make_symbolic_link_async)    (GFile                *file,
0391                                                        const char           *symlink_value,
0392                                                        int                   io_priority,
0393                                                        GCancellable         *cancellable,
0394                                                        GAsyncReadyCallback   callback,
0395                                                        gpointer              user_data);
0396   gboolean            (* make_symbolic_link_finish)   (GFile                 *file,
0397                                                        GAsyncResult         *result,
0398                                                        GError              **error);
0399 
0400   gboolean            (* copy)                        (GFile                *source,
0401                                                        GFile                *destination,
0402                                                        GFileCopyFlags        flags,
0403                                                        GCancellable         *cancellable,
0404                                                        GFileProgressCallback progress_callback,
0405                                                        gpointer              progress_callback_data,
0406                                                        GError              **error);
0407   void                (* copy_async)                  (GFile                *source,
0408                                                        GFile                *destination,
0409                                                        GFileCopyFlags        flags,
0410                                                        int                   io_priority,
0411                                                        GCancellable         *cancellable,
0412                                                        GFileProgressCallback progress_callback,
0413                                                        gpointer              progress_callback_data,
0414                                                        GAsyncReadyCallback   callback,
0415                                                        gpointer              user_data);
0416   gboolean            (* copy_finish)                 (GFile                *file,
0417                                                        GAsyncResult         *res,
0418                                                        GError              **error);
0419 
0420   gboolean            (* move)                        (GFile                *source,
0421                                                        GFile                *destination,
0422                                                        GFileCopyFlags        flags,
0423                                                        GCancellable         *cancellable,
0424                                                        GFileProgressCallback progress_callback,
0425                                                        gpointer              progress_callback_data,
0426                                                        GError              **error);
0427   void                (* move_async)                  (GFile                *source,
0428                                                        GFile                *destination,
0429                                                        GFileCopyFlags        flags,
0430                                                        int                   io_priority,
0431                                                        GCancellable         *cancellable,
0432                                                        GFileProgressCallback progress_callback,
0433                                                        gpointer              progress_callback_data,
0434                                                        GAsyncReadyCallback   callback,
0435                                                        gpointer              user_data);
0436   gboolean            (* move_finish)                 (GFile                *file,
0437                                                        GAsyncResult         *result,
0438                                                        GError              **error);
0439 
0440   void                (* mount_mountable)             (GFile                *file,
0441                                                        GMountMountFlags      flags,
0442                                                        GMountOperation      *mount_operation,
0443                                                        GCancellable         *cancellable,
0444                                                        GAsyncReadyCallback   callback,
0445                                                        gpointer              user_data);
0446   GFile *             (* mount_mountable_finish)      (GFile                *file,
0447                                                        GAsyncResult         *result,
0448                                                        GError              **error);
0449 
0450   void                (* unmount_mountable)           (GFile                *file,
0451                                                        GMountUnmountFlags    flags,
0452                                                        GCancellable         *cancellable,
0453                                                        GAsyncReadyCallback   callback,
0454                                                        gpointer              user_data);
0455   gboolean            (* unmount_mountable_finish)    (GFile                *file,
0456                                                        GAsyncResult         *result,
0457                                                        GError              **error);
0458 
0459   void                (* eject_mountable)             (GFile                *file,
0460                                                        GMountUnmountFlags    flags,
0461                                                        GCancellable         *cancellable,
0462                                                        GAsyncReadyCallback   callback,
0463                                                        gpointer              user_data);
0464   gboolean            (* eject_mountable_finish)      (GFile                *file,
0465                                                        GAsyncResult         *result,
0466                                                        GError              **error);
0467 
0468   void                (* mount_enclosing_volume)      (GFile                *location,
0469                                                        GMountMountFlags      flags,
0470                                                        GMountOperation      *mount_operation,
0471                                                        GCancellable         *cancellable,
0472                                                        GAsyncReadyCallback   callback,
0473                                                        gpointer              user_data);
0474   gboolean         (* mount_enclosing_volume_finish)  (GFile                *location,
0475                                                        GAsyncResult         *result,
0476                                                        GError              **error);
0477 
0478   GFileMonitor *      (* monitor_dir)                 (GFile                *file,
0479                                                        GFileMonitorFlags     flags,
0480                                                        GCancellable         *cancellable,
0481                                                        GError              **error);
0482   GFileMonitor *      (* monitor_file)                (GFile                *file,
0483                                                        GFileMonitorFlags     flags,
0484                                                        GCancellable         *cancellable,
0485                                                        GError              **error);
0486 
0487   GFileIOStream *     (* open_readwrite)              (GFile                *file,
0488                                                        GCancellable         *cancellable,
0489                                                        GError              **error);
0490   void                (* open_readwrite_async)        (GFile                *file,
0491                                                        int                   io_priority,
0492                                                        GCancellable         *cancellable,
0493                                                        GAsyncReadyCallback   callback,
0494                                                        gpointer              user_data);
0495   GFileIOStream *     (* open_readwrite_finish)       (GFile                *file,
0496                                                        GAsyncResult         *res,
0497                                                        GError              **error);
0498   GFileIOStream *     (* create_readwrite)            (GFile                *file,
0499                                GFileCreateFlags      flags,
0500                                                        GCancellable         *cancellable,
0501                                                        GError              **error);
0502   void                (* create_readwrite_async)      (GFile                *file,
0503                                GFileCreateFlags      flags,
0504                                                        int                   io_priority,
0505                                                        GCancellable         *cancellable,
0506                                                        GAsyncReadyCallback   callback,
0507                                                        gpointer              user_data);
0508   GFileIOStream *     (* create_readwrite_finish)      (GFile                *file,
0509                                                        GAsyncResult         *res,
0510                                                        GError              **error);
0511   GFileIOStream *     (* replace_readwrite)           (GFile                *file,
0512                                                        const char           *etag,
0513                                                        gboolean              make_backup,
0514                                                        GFileCreateFlags      flags,
0515                                                        GCancellable         *cancellable,
0516                                                        GError              **error);
0517   void                (* replace_readwrite_async)     (GFile                *file,
0518                                                        const char           *etag,
0519                                                        gboolean              make_backup,
0520                                                        GFileCreateFlags      flags,
0521                                                        int                   io_priority,
0522                                                        GCancellable         *cancellable,
0523                                                        GAsyncReadyCallback   callback,
0524                                                        gpointer              user_data);
0525   GFileIOStream *     (* replace_readwrite_finish)    (GFile                *file,
0526                                                        GAsyncResult         *res,
0527                                                        GError              **error);
0528 
0529   void                (* start_mountable)             (GFile                *file,
0530                                                        GDriveStartFlags      flags,
0531                                                        GMountOperation      *start_operation,
0532                                                        GCancellable         *cancellable,
0533                                                        GAsyncReadyCallback   callback,
0534                                                        gpointer              user_data);
0535   gboolean            (* start_mountable_finish)      (GFile                *file,
0536                                                        GAsyncResult         *result,
0537                                                        GError              **error);
0538 
0539   void                (* stop_mountable)              (GFile                *file,
0540                                                        GMountUnmountFlags    flags,
0541                                                        GMountOperation      *mount_operation,
0542                                                        GCancellable         *cancellable,
0543                                                        GAsyncReadyCallback   callback,
0544                                                        gpointer              user_data);
0545   gboolean            (* stop_mountable_finish)       (GFile                *file,
0546                                                        GAsyncResult         *result,
0547                                                        GError              **error);
0548 
0549   gboolean            supports_thread_contexts;
0550 
0551   void                (* unmount_mountable_with_operation) (GFile           *file,
0552                                                        GMountUnmountFlags    flags,
0553                                                        GMountOperation      *mount_operation,
0554                                                        GCancellable         *cancellable,
0555                                                        GAsyncReadyCallback   callback,
0556                                                        gpointer              user_data);
0557   gboolean            (* unmount_mountable_with_operation_finish) (GFile    *file,
0558                                                        GAsyncResult         *result,
0559                                                        GError              **error);
0560 
0561   void                (* eject_mountable_with_operation) (GFile             *file,
0562                                                        GMountUnmountFlags    flags,
0563                                                        GMountOperation      *mount_operation,
0564                                                        GCancellable         *cancellable,
0565                                                        GAsyncReadyCallback   callback,
0566                                                        gpointer              user_data);
0567   gboolean            (* eject_mountable_with_operation_finish) (GFile      *file,
0568                                                        GAsyncResult         *result,
0569                                                        GError              **error);
0570 
0571   void                (* poll_mountable)              (GFile                *file,
0572                                                        GCancellable         *cancellable,
0573                                                        GAsyncReadyCallback   callback,
0574                                                        gpointer              user_data);
0575   gboolean            (* poll_mountable_finish)       (GFile                *file,
0576                                                        GAsyncResult         *result,
0577                                                        GError              **error);
0578 
0579   gboolean            (* measure_disk_usage)          (GFile                         *file,
0580                                                        GFileMeasureFlags              flags,
0581                                                        GCancellable                  *cancellable,
0582                                                        GFileMeasureProgressCallback   progress_callback,
0583                                                        gpointer                       progress_data,
0584                                                        guint64                       *disk_usage,
0585                                                        guint64                       *num_dirs,
0586                                                        guint64                       *num_files,
0587                                                        GError                       **error);
0588   void                (* measure_disk_usage_async)    (GFile                         *file,
0589                                                        GFileMeasureFlags              flags,
0590                                                        gint                           io_priority,
0591                                                        GCancellable                  *cancellable,
0592                                                        GFileMeasureProgressCallback   progress_callback,
0593                                                        gpointer                       progress_data,
0594                                                        GAsyncReadyCallback            callback,
0595                                                        gpointer                       user_data);
0596   gboolean            (* measure_disk_usage_finish)   (GFile                         *file,
0597                                                        GAsyncResult                  *result,
0598                                                        guint64                       *disk_usage,
0599                                                        guint64                       *num_dirs,
0600                                                        guint64                       *num_files,
0601                                                        GError                       **error);
0602 
0603   gboolean            (* query_exists)                (GFile                         *file,
0604                                                        GCancellable                  *cancellable);
0605 };
0606 
0607 GIO_AVAILABLE_IN_ALL
0608 GType                   g_file_get_type                   (void) G_GNUC_CONST;
0609 
0610 GIO_AVAILABLE_IN_ALL
0611 GFile *                 g_file_new_for_path               (const char                 *path);
0612 GIO_AVAILABLE_IN_ALL
0613 GFile *                 g_file_new_for_uri                (const char                 *uri);
0614 GIO_AVAILABLE_IN_ALL
0615 GFile *                 g_file_new_for_commandline_arg    (const char                 *arg);
0616 GIO_AVAILABLE_IN_2_36
0617 GFile *                 g_file_new_for_commandline_arg_and_cwd (const gchar           *arg,
0618                                                                 const gchar           *cwd);
0619 GIO_AVAILABLE_IN_2_32
0620 GFile *                 g_file_new_tmp                    (const char                 *tmpl,
0621                                                            GFileIOStream             **iostream,
0622                                                            GError                    **error);
0623 GIO_AVAILABLE_IN_2_74
0624 void                    g_file_new_tmp_async              (const char                 *tmpl,
0625                                                            int                         io_priority,
0626                                                            GCancellable               *cancellable,
0627                                                            GAsyncReadyCallback         callback,
0628                                                            gpointer                    user_data);
0629 GIO_AVAILABLE_IN_2_74
0630 GFile *                 g_file_new_tmp_finish             (GAsyncResult               *result,
0631                                                            GFileIOStream             **iostream,
0632                                                            GError                    **error);
0633 GIO_AVAILABLE_IN_2_74
0634 void                    g_file_new_tmp_dir_async          (const char                 *tmpl,
0635                                                            int                         io_priority,
0636                                                            GCancellable               *cancellable,
0637                                                            GAsyncReadyCallback         callback,
0638                                                            gpointer                    user_data);
0639 GIO_AVAILABLE_IN_2_74
0640 GFile *                 g_file_new_tmp_dir_finish         (GAsyncResult               *result,
0641                                                            GError                    **error);
0642 GIO_AVAILABLE_IN_ALL
0643 GFile *                 g_file_parse_name                 (const char                 *parse_name);
0644 GIO_AVAILABLE_IN_2_56
0645 GFile *                 g_file_new_build_filename         (const gchar                *first_element,
0646                                                            ...) G_GNUC_NULL_TERMINATED;
0647 GIO_AVAILABLE_IN_2_78
0648 GFile *                 g_file_new_build_filenamev        (const gchar                * const *args);
0649 GIO_AVAILABLE_IN_ALL
0650 GFile *                 g_file_dup                        (GFile                      *file);
0651 GIO_AVAILABLE_IN_ALL
0652 guint                   g_file_hash                       (gconstpointer               file);
0653 GIO_AVAILABLE_IN_ALL
0654 gboolean                g_file_equal                      (GFile                      *file1,
0655                                GFile                      *file2);
0656 GIO_AVAILABLE_IN_ALL
0657 char *                  g_file_get_basename               (GFile                      *file);
0658 GIO_AVAILABLE_IN_ALL
0659 char *                  g_file_get_path                   (GFile                      *file);
0660 GIO_AVAILABLE_IN_2_56
0661 const char *            g_file_peek_path                  (GFile                      *file);
0662 GIO_AVAILABLE_IN_ALL
0663 char *                  g_file_get_uri                    (GFile                      *file);
0664 GIO_AVAILABLE_IN_ALL
0665 char *                  g_file_get_parse_name             (GFile                      *file);
0666 GIO_AVAILABLE_IN_ALL
0667 GFile *                 g_file_get_parent                 (GFile                      *file);
0668 GIO_AVAILABLE_IN_ALL
0669 gboolean                g_file_has_parent                 (GFile                      *file,
0670                                                            GFile                      *parent);
0671 GIO_AVAILABLE_IN_ALL
0672 GFile *                 g_file_get_child                  (GFile                      *file,
0673                                const char                 *name);
0674 GIO_AVAILABLE_IN_ALL
0675 GFile *                 g_file_get_child_for_display_name (GFile                      *file,
0676                                const char                 *display_name,
0677                                GError                    **error);
0678 GIO_AVAILABLE_IN_ALL
0679 gboolean                g_file_has_prefix                 (GFile                      *file,
0680                                GFile                      *prefix);
0681 GIO_AVAILABLE_IN_ALL
0682 char *                  g_file_get_relative_path          (GFile                      *parent,
0683                                GFile                      *descendant);
0684 GIO_AVAILABLE_IN_ALL
0685 GFile *                 g_file_resolve_relative_path      (GFile                      *file,
0686                                const char                 *relative_path);
0687 GIO_AVAILABLE_IN_ALL
0688 gboolean                g_file_is_native                  (GFile                      *file);
0689 GIO_AVAILABLE_IN_ALL
0690 gboolean                g_file_has_uri_scheme             (GFile                      *file,
0691                                const char                 *uri_scheme);
0692 GIO_AVAILABLE_IN_ALL
0693 char *                  g_file_get_uri_scheme             (GFile                      *file);
0694 GIO_AVAILABLE_IN_ALL
0695 GFileInputStream *      g_file_read                       (GFile                      *file,
0696                                GCancellable               *cancellable,
0697                                GError                    **error);
0698 GIO_AVAILABLE_IN_ALL
0699 void                    g_file_read_async                 (GFile                      *file,
0700                                int                         io_priority,
0701                                GCancellable               *cancellable,
0702                                GAsyncReadyCallback         callback,
0703                                gpointer                    user_data);
0704 GIO_AVAILABLE_IN_ALL
0705 GFileInputStream *      g_file_read_finish                (GFile                      *file,
0706                                GAsyncResult               *res,
0707                                GError                    **error);
0708 GIO_AVAILABLE_IN_ALL
0709 GFileOutputStream *     g_file_append_to                  (GFile                      *file,
0710                                GFileCreateFlags             flags,
0711                                GCancellable               *cancellable,
0712                                GError                    **error);
0713 GIO_AVAILABLE_IN_ALL
0714 GFileOutputStream *     g_file_create                     (GFile                      *file,
0715                                GFileCreateFlags             flags,
0716                                GCancellable               *cancellable,
0717                                GError                    **error);
0718 GIO_AVAILABLE_IN_ALL
0719 GFileOutputStream *     g_file_replace                    (GFile                      *file,
0720                                const char                 *etag,
0721                                gboolean                    make_backup,
0722                                GFileCreateFlags            flags,
0723                                GCancellable               *cancellable,
0724                                GError                    **error);
0725 GIO_AVAILABLE_IN_ALL
0726 void                    g_file_append_to_async            (GFile                      *file,
0727                                GFileCreateFlags            flags,
0728                                int                         io_priority,
0729                                GCancellable               *cancellable,
0730                                GAsyncReadyCallback         callback,
0731                                gpointer                    user_data);
0732 GIO_AVAILABLE_IN_ALL
0733 GFileOutputStream *     g_file_append_to_finish           (GFile                      *file,
0734                                GAsyncResult               *res,
0735                                GError                    **error);
0736 GIO_AVAILABLE_IN_ALL
0737 void                    g_file_create_async               (GFile                      *file,
0738                                GFileCreateFlags            flags,
0739                                int                         io_priority,
0740                                GCancellable               *cancellable,
0741                                GAsyncReadyCallback         callback,
0742                                gpointer                    user_data);
0743 GIO_AVAILABLE_IN_ALL
0744 GFileOutputStream *     g_file_create_finish              (GFile                      *file,
0745                                GAsyncResult               *res,
0746                                GError                    **error);
0747 GIO_AVAILABLE_IN_ALL
0748 void                    g_file_replace_async              (GFile                      *file,
0749                                const char                 *etag,
0750                                gboolean                    make_backup,
0751                                GFileCreateFlags            flags,
0752                                int                         io_priority,
0753                                GCancellable               *cancellable,
0754                                GAsyncReadyCallback         callback,
0755                                gpointer                    user_data);
0756 GIO_AVAILABLE_IN_ALL
0757 GFileOutputStream *     g_file_replace_finish             (GFile                      *file,
0758                                GAsyncResult               *res,
0759                                GError                    **error);
0760 GIO_AVAILABLE_IN_ALL
0761 GFileIOStream *         g_file_open_readwrite             (GFile                      *file,
0762                                GCancellable               *cancellable,
0763                                GError                    **error);
0764 GIO_AVAILABLE_IN_ALL
0765 void                    g_file_open_readwrite_async       (GFile                      *file,
0766                                int                         io_priority,
0767                                GCancellable               *cancellable,
0768                                GAsyncReadyCallback         callback,
0769                                gpointer                    user_data);
0770 GIO_AVAILABLE_IN_ALL
0771 GFileIOStream *         g_file_open_readwrite_finish      (GFile                      *file,
0772                                GAsyncResult               *res,
0773                                GError                    **error);
0774 GIO_AVAILABLE_IN_ALL
0775 GFileIOStream *         g_file_create_readwrite           (GFile                      *file,
0776                                GFileCreateFlags            flags,
0777                                GCancellable               *cancellable,
0778                                GError                    **error);
0779 GIO_AVAILABLE_IN_ALL
0780 void                    g_file_create_readwrite_async     (GFile                      *file,
0781                                GFileCreateFlags            flags,
0782                                int                         io_priority,
0783                                GCancellable               *cancellable,
0784                                GAsyncReadyCallback         callback,
0785                                gpointer                    user_data);
0786 GIO_AVAILABLE_IN_ALL
0787 GFileIOStream *         g_file_create_readwrite_finish    (GFile                      *file,
0788                                GAsyncResult               *res,
0789                                GError                    **error);
0790 GIO_AVAILABLE_IN_ALL
0791 GFileIOStream *         g_file_replace_readwrite          (GFile                      *file,
0792                                const char                 *etag,
0793                                gboolean                    make_backup,
0794                                GFileCreateFlags            flags,
0795                                GCancellable               *cancellable,
0796                                GError                    **error);
0797 GIO_AVAILABLE_IN_ALL
0798 void                    g_file_replace_readwrite_async    (GFile                      *file,
0799                                const char                 *etag,
0800                                gboolean                    make_backup,
0801                                GFileCreateFlags            flags,
0802                                int                         io_priority,
0803                                GCancellable               *cancellable,
0804                                GAsyncReadyCallback         callback,
0805                                gpointer                    user_data);
0806 GIO_AVAILABLE_IN_ALL
0807 GFileIOStream *         g_file_replace_readwrite_finish   (GFile                      *file,
0808                                GAsyncResult               *res,
0809                                GError                    **error);
0810 GIO_AVAILABLE_IN_ALL
0811 gboolean                g_file_query_exists               (GFile                      *file,
0812                                GCancellable               *cancellable);
0813 GIO_AVAILABLE_IN_ALL
0814 GFileType               g_file_query_file_type            (GFile                      *file,
0815                                                            GFileQueryInfoFlags         flags,
0816                                                            GCancellable               *cancellable);
0817 GIO_AVAILABLE_IN_ALL
0818 GFileInfo *             g_file_query_info                 (GFile                      *file,
0819                                const char                 *attributes,
0820                                GFileQueryInfoFlags         flags,
0821                                GCancellable               *cancellable,
0822                                GError                    **error);
0823 GIO_AVAILABLE_IN_ALL
0824 void                    g_file_query_info_async           (GFile                      *file,
0825                                const char                 *attributes,
0826                                GFileQueryInfoFlags         flags,
0827                                int                         io_priority,
0828                                GCancellable               *cancellable,
0829                                GAsyncReadyCallback         callback,
0830                                gpointer                    user_data);
0831 GIO_AVAILABLE_IN_ALL
0832 GFileInfo *             g_file_query_info_finish          (GFile                      *file,
0833                                GAsyncResult               *res,
0834                                GError                    **error);
0835 GIO_AVAILABLE_IN_ALL
0836 GFileInfo *             g_file_query_filesystem_info      (GFile                      *file,
0837                                const char                 *attributes,
0838                                GCancellable               *cancellable,
0839                                GError                    **error);
0840 GIO_AVAILABLE_IN_ALL
0841 void                    g_file_query_filesystem_info_async (GFile                      *file,
0842                                const char                 *attributes,
0843                                int                         io_priority,
0844                                GCancellable               *cancellable,
0845                                GAsyncReadyCallback         callback,
0846                                gpointer                    user_data);
0847 GIO_AVAILABLE_IN_ALL
0848 GFileInfo *             g_file_query_filesystem_info_finish (GFile                      *file,
0849                                                            GAsyncResult               *res,
0850                                GError                    **error);
0851 GIO_AVAILABLE_IN_ALL
0852 GMount *                g_file_find_enclosing_mount       (GFile                      *file,
0853                                                            GCancellable               *cancellable,
0854                                                            GError                    **error);
0855 GIO_AVAILABLE_IN_ALL
0856 void                    g_file_find_enclosing_mount_async (GFile                      *file,
0857                                int                         io_priority,
0858                                GCancellable               *cancellable,
0859                                GAsyncReadyCallback         callback,
0860                                gpointer                    user_data);
0861 GIO_AVAILABLE_IN_ALL
0862 GMount *                g_file_find_enclosing_mount_finish (GFile                     *file,
0863                                 GAsyncResult              *res,
0864                                 GError                   **error);
0865 GIO_AVAILABLE_IN_ALL
0866 GFileEnumerator *       g_file_enumerate_children         (GFile                      *file,
0867                                const char                 *attributes,
0868                                GFileQueryInfoFlags         flags,
0869                                GCancellable               *cancellable,
0870                                GError                    **error);
0871 GIO_AVAILABLE_IN_ALL
0872 void                    g_file_enumerate_children_async   (GFile                      *file,
0873                                const char                 *attributes,
0874                                GFileQueryInfoFlags         flags,
0875                                int                         io_priority,
0876                                GCancellable               *cancellable,
0877                                GAsyncReadyCallback         callback,
0878                                gpointer                    user_data);
0879 GIO_AVAILABLE_IN_ALL
0880 GFileEnumerator *       g_file_enumerate_children_finish  (GFile                      *file,
0881                                GAsyncResult               *res,
0882                                GError                    **error);
0883 GIO_AVAILABLE_IN_ALL
0884 GFile *                 g_file_set_display_name           (GFile                      *file,
0885                                const char                 *display_name,
0886                                GCancellable               *cancellable,
0887                                GError                    **error);
0888 GIO_AVAILABLE_IN_ALL
0889 void                    g_file_set_display_name_async     (GFile                      *file,
0890                                const char                 *display_name,
0891                                int                         io_priority,
0892                                GCancellable               *cancellable,
0893                                GAsyncReadyCallback         callback,
0894                                gpointer                    user_data);
0895 GIO_AVAILABLE_IN_ALL
0896 GFile *                 g_file_set_display_name_finish    (GFile                      *file,
0897                                GAsyncResult               *res,
0898                                GError                    **error);
0899 GIO_AVAILABLE_IN_ALL
0900 gboolean                g_file_delete                     (GFile                      *file,
0901                                GCancellable               *cancellable,
0902                                GError                    **error);
0903 
0904 GIO_AVAILABLE_IN_2_34
0905 void                    g_file_delete_async               (GFile                      *file,
0906                                int                         io_priority,
0907                                GCancellable               *cancellable,
0908                                GAsyncReadyCallback         callback,
0909                                gpointer                    user_data);
0910 
0911 GIO_AVAILABLE_IN_2_34
0912 gboolean                g_file_delete_finish              (GFile                      *file,
0913                                GAsyncResult               *result,
0914                                GError                    **error);
0915 
0916 GIO_AVAILABLE_IN_ALL
0917 gboolean                g_file_trash                      (GFile                      *file,
0918                                GCancellable               *cancellable,
0919                                GError                    **error);
0920 
0921 GIO_AVAILABLE_IN_2_38
0922 void                    g_file_trash_async                (GFile                      *file,
0923                                int                         io_priority,
0924                                GCancellable               *cancellable,
0925                                GAsyncReadyCallback         callback,
0926                                gpointer                    user_data);
0927 
0928 GIO_AVAILABLE_IN_2_38
0929 gboolean                g_file_trash_finish               (GFile                      *file,
0930                                GAsyncResult               *result,
0931                                GError                    **error);
0932 
0933 GIO_AVAILABLE_IN_ALL
0934 gboolean                g_file_copy                       (GFile                      *source,
0935                                GFile                      *destination,
0936                                GFileCopyFlags              flags,
0937                                GCancellable               *cancellable,
0938                                GFileProgressCallback       progress_callback,
0939                                gpointer                    progress_callback_data,
0940                                GError                    **error);
0941 GIO_AVAILABLE_IN_ALL
0942 void                    g_file_copy_async                 (GFile                      *source,
0943                                GFile                      *destination,
0944                                GFileCopyFlags              flags,
0945                                int                         io_priority,
0946                                GCancellable               *cancellable,
0947                                GFileProgressCallback       progress_callback,
0948                                gpointer                    progress_callback_data,
0949                                GAsyncReadyCallback         callback,
0950                                gpointer                    user_data);
0951 GIO_AVAILABLE_IN_2_82
0952 void g_file_copy_async_with_closures (GFile *source,
0953                                       GFile *destination,
0954                                       GFileCopyFlags flags,
0955                                       int io_priority,
0956                                       GCancellable *cancellable,
0957                                       GClosure *progress_callback_closure,
0958                                       GClosure *ready_callback_closure);
0959 GIO_AVAILABLE_IN_ALL
0960 gboolean                g_file_copy_finish                (GFile                      *file,
0961                                GAsyncResult               *res,
0962                                GError                    **error);
0963 GIO_AVAILABLE_IN_ALL
0964 gboolean                g_file_move                       (GFile                      *source,
0965                                GFile                      *destination,
0966                                GFileCopyFlags              flags,
0967                                GCancellable               *cancellable,
0968                                GFileProgressCallback       progress_callback,
0969                                gpointer                    progress_callback_data,
0970                                GError                    **error);
0971 GIO_AVAILABLE_IN_2_72
0972 void                    g_file_move_async                 (GFile                      *source,
0973                                                                          GFile                      *destination,
0974                                                                          GFileCopyFlags              flags,
0975                                                                          int                         io_priority,
0976                                                                          GCancellable               *cancellable,
0977                                                                          GFileProgressCallback       progress_callback,
0978                                                                          gpointer                    progress_callback_data,
0979                                                                          GAsyncReadyCallback         callback,
0980                                                                          gpointer                    user_data);
0981 GIO_AVAILABLE_IN_2_82
0982 void g_file_move_async_with_closures (GFile *source,
0983                                       GFile *destination,
0984                                       GFileCopyFlags flags,
0985                                       int io_priority,
0986                                       GCancellable *cancellable,
0987                                       GClosure *progress_callback_closure,
0988                                       GClosure *ready_callback_closure);
0989 GIO_AVAILABLE_IN_2_72
0990 gboolean                g_file_move_finish                (GFile                      *file,
0991                                                                          GAsyncResult               *result,
0992                                                                          GError                    **error);
0993 GIO_AVAILABLE_IN_ALL
0994 gboolean                g_file_make_directory             (GFile                      *file,
0995                                GCancellable               *cancellable,
0996                                GError                    **error);
0997 GIO_AVAILABLE_IN_2_38
0998 void                    g_file_make_directory_async       (GFile                      *file,
0999                                                            int                         io_priority,
1000                                                            GCancellable               *cancellable,
1001                                                            GAsyncReadyCallback         callback,
1002                                                            gpointer                    user_data);
1003 GIO_AVAILABLE_IN_2_38
1004 gboolean                g_file_make_directory_finish      (GFile                      *file,
1005                                                            GAsyncResult               *result,
1006                                                            GError                    **error);
1007 
1008 GIO_AVAILABLE_IN_ALL
1009 gboolean                g_file_make_directory_with_parents (GFile                     *file,
1010                                                    GCancellable               *cancellable,
1011                                                    GError                    **error);
1012 GIO_AVAILABLE_IN_ALL
1013 gboolean                g_file_make_symbolic_link         (GFile                      *file,
1014                                const char                 *symlink_value,
1015                                GCancellable               *cancellable,
1016                                GError                    **error);
1017 GIO_AVAILABLE_IN_2_74
1018 void                    g_file_make_symbolic_link_async   (GFile                      *file,
1019                                                            const char                 *symlink_value,
1020                                                            int                         io_priority,
1021                                                            GCancellable               *cancellable,
1022                                                            GAsyncReadyCallback         callback,
1023                                                            gpointer                    user_data);
1024 GIO_AVAILABLE_IN_2_74
1025 gboolean                g_file_make_symbolic_link_finish  (GFile                      *file,
1026                                                            GAsyncResult               *result,
1027                                                            GError                    **error);
1028 GIO_AVAILABLE_IN_ALL
1029 GFileAttributeInfoList *g_file_query_settable_attributes  (GFile                      *file,
1030                                GCancellable               *cancellable,
1031                                GError                    **error);
1032 GIO_AVAILABLE_IN_ALL
1033 GFileAttributeInfoList *g_file_query_writable_namespaces  (GFile                      *file,
1034                                GCancellable               *cancellable,
1035                                GError                    **error);
1036 GIO_AVAILABLE_IN_ALL
1037 gboolean                g_file_set_attribute              (GFile                      *file,
1038                                const char                 *attribute,
1039                                GFileAttributeType          type,
1040                                gpointer                    value_p,
1041                                GFileQueryInfoFlags         flags,
1042                                GCancellable               *cancellable,
1043                                GError                    **error);
1044 GIO_AVAILABLE_IN_ALL
1045 gboolean                g_file_set_attributes_from_info   (GFile                      *file,
1046                                GFileInfo                  *info,
1047                                GFileQueryInfoFlags         flags,
1048                                GCancellable               *cancellable,
1049                                GError                    **error);
1050 GIO_AVAILABLE_IN_ALL
1051 void                    g_file_set_attributes_async       (GFile                      *file,
1052                                GFileInfo                  *info,
1053                                GFileQueryInfoFlags         flags,
1054                                int                         io_priority,
1055                                GCancellable               *cancellable,
1056                                GAsyncReadyCallback         callback,
1057                                gpointer                    user_data);
1058 GIO_AVAILABLE_IN_ALL
1059 gboolean                g_file_set_attributes_finish      (GFile                      *file,
1060                                GAsyncResult               *result,
1061                                GFileInfo                 **info,
1062                                GError                    **error);
1063 GIO_AVAILABLE_IN_ALL
1064 gboolean                g_file_set_attribute_string       (GFile                      *file,
1065                                const char                 *attribute,
1066                                const char                 *value,
1067                                GFileQueryInfoFlags         flags,
1068                                GCancellable               *cancellable,
1069                                GError                    **error);
1070 GIO_AVAILABLE_IN_ALL
1071 gboolean                g_file_set_attribute_byte_string  (GFile                      *file,
1072                                const char                 *attribute,
1073                                const char                 *value,
1074                                GFileQueryInfoFlags         flags,
1075                                GCancellable               *cancellable,
1076                                GError                    **error);
1077 GIO_AVAILABLE_IN_ALL
1078 gboolean                g_file_set_attribute_uint32       (GFile                      *file,
1079                                const char                 *attribute,
1080                                guint32                     value,
1081                                GFileQueryInfoFlags         flags,
1082                                GCancellable               *cancellable,
1083                                GError                    **error);
1084 GIO_AVAILABLE_IN_ALL
1085 gboolean                g_file_set_attribute_int32        (GFile                      *file,
1086                                const char                 *attribute,
1087                                gint32                      value,
1088                                GFileQueryInfoFlags         flags,
1089                                GCancellable               *cancellable,
1090                                GError                    **error);
1091 GIO_AVAILABLE_IN_ALL
1092 gboolean                g_file_set_attribute_uint64       (GFile                      *file,
1093                                const char                 *attribute,
1094                                guint64                     value,
1095                                GFileQueryInfoFlags         flags,
1096                                GCancellable               *cancellable,
1097                                GError                    **error);
1098 GIO_AVAILABLE_IN_ALL
1099 gboolean                g_file_set_attribute_int64        (GFile                      *file,
1100                                const char                 *attribute,
1101                                gint64                      value,
1102                                GFileQueryInfoFlags         flags,
1103                                GCancellable               *cancellable,
1104                                GError                    **error);
1105 GIO_AVAILABLE_IN_ALL
1106 void                    g_file_mount_enclosing_volume     (GFile                      *location,
1107                                GMountMountFlags            flags,
1108                                GMountOperation            *mount_operation,
1109                                GCancellable               *cancellable,
1110                                GAsyncReadyCallback         callback,
1111                                gpointer                    user_data);
1112 GIO_AVAILABLE_IN_ALL
1113 gboolean                g_file_mount_enclosing_volume_finish (GFile                      *location,
1114                                GAsyncResult               *result,
1115                                GError                    **error);
1116 GIO_AVAILABLE_IN_ALL
1117 void                    g_file_mount_mountable            (GFile                      *file,
1118                                GMountMountFlags            flags,
1119                                GMountOperation            *mount_operation,
1120                                GCancellable               *cancellable,
1121                                GAsyncReadyCallback         callback,
1122                                gpointer                    user_data);
1123 GIO_AVAILABLE_IN_ALL
1124 GFile *                 g_file_mount_mountable_finish     (GFile                      *file,
1125                                GAsyncResult               *result,
1126                                GError                    **error);
1127 GIO_DEPRECATED_FOR(g_file_unmount_mountable_with_operation)
1128 void                    g_file_unmount_mountable          (GFile                      *file,
1129                                                            GMountUnmountFlags          flags,
1130                                                            GCancellable               *cancellable,
1131                                                            GAsyncReadyCallback         callback,
1132                                                            gpointer                    user_data);
1133 
1134 GIO_DEPRECATED_FOR(g_file_unmount_mountable_with_operation_finish)
1135 gboolean                g_file_unmount_mountable_finish   (GFile                      *file,
1136                                                            GAsyncResult               *result,
1137                                                            GError                    **error);
1138 GIO_AVAILABLE_IN_ALL
1139 void                    g_file_unmount_mountable_with_operation (GFile                *file,
1140                                GMountUnmountFlags          flags,
1141                                GMountOperation            *mount_operation,
1142                                GCancellable               *cancellable,
1143                                GAsyncReadyCallback         callback,
1144                                gpointer                    user_data);
1145 GIO_AVAILABLE_IN_ALL
1146 gboolean                g_file_unmount_mountable_with_operation_finish (GFile         *file,
1147                                GAsyncResult               *result,
1148                                GError                    **error);
1149 GIO_DEPRECATED_FOR(g_file_eject_mountable_with_operation)
1150 void                    g_file_eject_mountable            (GFile                      *file,
1151                                                            GMountUnmountFlags          flags,
1152                                                            GCancellable               *cancellable,
1153                                                            GAsyncReadyCallback         callback,
1154                                                            gpointer                    user_data);
1155 
1156 GIO_DEPRECATED_FOR(g_file_eject_mountable_with_operation_finish)
1157 gboolean                g_file_eject_mountable_finish     (GFile                      *file,
1158                                                            GAsyncResult               *result,
1159                                                            GError                    **error);
1160 GIO_AVAILABLE_IN_ALL
1161 void                    g_file_eject_mountable_with_operation (GFile                  *file,
1162                                GMountUnmountFlags          flags,
1163                                GMountOperation            *mount_operation,
1164                                GCancellable               *cancellable,
1165                                GAsyncReadyCallback         callback,
1166                                gpointer                    user_data);
1167 GIO_AVAILABLE_IN_ALL
1168 gboolean                g_file_eject_mountable_with_operation_finish (GFile           *file,
1169                                GAsyncResult               *result,
1170                                GError                    **error);
1171 
1172 GIO_AVAILABLE_IN_2_68
1173 char *          g_file_build_attribute_list_for_copy (GFile                   *file,
1174                                GFileCopyFlags              flags,
1175                                GCancellable               *cancellable,
1176                                GError                    **error);
1177 
1178 GIO_AVAILABLE_IN_ALL
1179 gboolean                g_file_copy_attributes            (GFile                      *source,
1180                                GFile                      *destination,
1181                                GFileCopyFlags              flags,
1182                                GCancellable               *cancellable,
1183                                GError                    **error);
1184 
1185 
1186 GIO_AVAILABLE_IN_ALL
1187 GFileMonitor*           g_file_monitor_directory          (GFile                  *file,
1188                                GFileMonitorFlags       flags,
1189                                GCancellable           *cancellable,
1190                                GError                **error);
1191 GIO_AVAILABLE_IN_ALL
1192 GFileMonitor*           g_file_monitor_file               (GFile                  *file,
1193                                GFileMonitorFlags       flags,
1194                                GCancellable           *cancellable,
1195                                GError                **error);
1196 GIO_AVAILABLE_IN_ALL
1197 GFileMonitor*           g_file_monitor                    (GFile                  *file,
1198                                GFileMonitorFlags       flags,
1199                                GCancellable           *cancellable,
1200                                GError                **error);
1201 
1202 GIO_AVAILABLE_IN_2_38
1203 gboolean                g_file_measure_disk_usage         (GFile                         *file,
1204                                                            GFileMeasureFlags              flags,
1205                                                            GCancellable                  *cancellable,
1206                                                            GFileMeasureProgressCallback   progress_callback,
1207                                                            gpointer                       progress_data,
1208                                                            guint64                       *disk_usage,
1209                                                            guint64                       *num_dirs,
1210                                                            guint64                       *num_files,
1211                                                            GError                       **error);
1212 
1213 GIO_AVAILABLE_IN_2_38
1214 void                    g_file_measure_disk_usage_async   (GFile                         *file,
1215                                                            GFileMeasureFlags              flags,
1216                                                            gint                           io_priority,
1217                                                            GCancellable                  *cancellable,
1218                                                            GFileMeasureProgressCallback   progress_callback,
1219                                                            gpointer                       progress_data,
1220                                                            GAsyncReadyCallback            callback,
1221                                                            gpointer                       user_data);
1222 
1223 GIO_AVAILABLE_IN_2_38
1224 gboolean                g_file_measure_disk_usage_finish  (GFile                         *file,
1225                                                            GAsyncResult                  *result,
1226                                                            guint64                       *disk_usage,
1227                                                            guint64                       *num_dirs,
1228                                                            guint64                       *num_files,
1229                                                            GError                       **error);
1230 
1231 GIO_AVAILABLE_IN_ALL
1232 void                    g_file_start_mountable            (GFile                      *file,
1233                                GDriveStartFlags            flags,
1234                                GMountOperation            *start_operation,
1235                                GCancellable               *cancellable,
1236                                GAsyncReadyCallback         callback,
1237                                gpointer                    user_data);
1238 GIO_AVAILABLE_IN_ALL
1239 gboolean                g_file_start_mountable_finish     (GFile                      *file,
1240                                GAsyncResult               *result,
1241                                GError                    **error);
1242 GIO_AVAILABLE_IN_ALL
1243 void                    g_file_stop_mountable             (GFile                      *file,
1244                                GMountUnmountFlags          flags,
1245                                                            GMountOperation            *mount_operation,
1246                                GCancellable               *cancellable,
1247                                GAsyncReadyCallback         callback,
1248                                gpointer                    user_data);
1249 GIO_AVAILABLE_IN_ALL
1250 gboolean                g_file_stop_mountable_finish      (GFile                      *file,
1251                                GAsyncResult               *result,
1252                                GError                    **error);
1253 
1254 GIO_AVAILABLE_IN_ALL
1255 void                    g_file_poll_mountable             (GFile                      *file,
1256                                GCancellable               *cancellable,
1257                                GAsyncReadyCallback         callback,
1258                                gpointer                    user_data);
1259 GIO_AVAILABLE_IN_ALL
1260 gboolean                g_file_poll_mountable_finish      (GFile                      *file,
1261                                GAsyncResult               *result,
1262                                GError                    **error);
1263 
1264 /* Utilities */
1265 
1266 GIO_AVAILABLE_IN_ALL
1267 GAppInfo *g_file_query_default_handler       (GFile                  *file,
1268                           GCancellable           *cancellable,
1269                           GError                **error);
1270 GIO_AVAILABLE_IN_2_60
1271 void      g_file_query_default_handler_async (GFile                  *file,
1272                                               int                     io_priority,
1273                                               GCancellable           *cancellable,
1274                                               GAsyncReadyCallback     callback,
1275                                               gpointer                user_data);
1276 GIO_AVAILABLE_IN_2_60
1277 GAppInfo *g_file_query_default_handler_finish (GFile                 *file,
1278                                                GAsyncResult          *result,
1279                                                GError               **error);
1280 
1281 GIO_AVAILABLE_IN_ALL
1282 gboolean g_file_load_contents                (GFile                  *file,
1283                           GCancellable           *cancellable,
1284                           char                  **contents,
1285                           gsize                  *length,
1286                           char                  **etag_out,
1287                           GError                **error);
1288 GIO_AVAILABLE_IN_ALL
1289 void     g_file_load_contents_async          (GFile                  *file,
1290                           GCancellable           *cancellable,
1291                           GAsyncReadyCallback     callback,
1292                           gpointer                user_data);
1293 GIO_AVAILABLE_IN_ALL
1294 gboolean g_file_load_contents_finish         (GFile                  *file,
1295                           GAsyncResult           *res,
1296                           char                  **contents,
1297                           gsize                  *length,
1298                           char                  **etag_out,
1299                           GError                **error);
1300 GIO_AVAILABLE_IN_ALL
1301 void     g_file_load_partial_contents_async  (GFile                  *file,
1302                           GCancellable           *cancellable,
1303                           GFileReadMoreCallback   read_more_callback,
1304                           GAsyncReadyCallback     callback,
1305                           gpointer                user_data);
1306 GIO_AVAILABLE_IN_ALL
1307 gboolean g_file_load_partial_contents_finish (GFile                  *file,
1308                           GAsyncResult           *res,
1309                           char                  **contents,
1310                           gsize                  *length,
1311                           char                  **etag_out,
1312                           GError                **error);
1313 GIO_AVAILABLE_IN_ALL
1314 gboolean g_file_replace_contents             (GFile                  *file,
1315                           const char             *contents,
1316                           gsize                   length,
1317                           const char             *etag,
1318                           gboolean                make_backup,
1319                           GFileCreateFlags        flags,
1320                           char                  **new_etag,
1321                           GCancellable           *cancellable,
1322                           GError                **error);
1323 GIO_AVAILABLE_IN_ALL
1324 void     g_file_replace_contents_async       (GFile                  *file,
1325                           const char             *contents,
1326                           gsize                   length,
1327                           const char             *etag,
1328                           gboolean                make_backup,
1329                           GFileCreateFlags        flags,
1330                           GCancellable           *cancellable,
1331                           GAsyncReadyCallback     callback,
1332                           gpointer                user_data);
1333 GIO_AVAILABLE_IN_2_40
1334 void     g_file_replace_contents_bytes_async (GFile                  *file,
1335                           GBytes                 *contents,
1336                           const char             *etag,
1337                           gboolean                make_backup,
1338                           GFileCreateFlags        flags,
1339                           GCancellable           *cancellable,
1340                           GAsyncReadyCallback     callback,
1341                           gpointer                user_data);
1342 GIO_AVAILABLE_IN_ALL
1343 gboolean g_file_replace_contents_finish      (GFile                  *file,
1344                           GAsyncResult           *res,
1345                           char                  **new_etag,
1346                           GError                **error);
1347 
1348 GIO_AVAILABLE_IN_ALL
1349 gboolean g_file_supports_thread_contexts     (GFile                  *file);
1350 
1351 GIO_AVAILABLE_IN_2_56
1352 GBytes  *g_file_load_bytes                   (GFile                  *file,
1353                                               GCancellable           *cancellable,
1354                                               gchar                 **etag_out,
1355                                               GError                **error);
1356 GIO_AVAILABLE_IN_2_56
1357 void     g_file_load_bytes_async             (GFile                  *file,
1358                                               GCancellable           *cancellable,
1359                                               GAsyncReadyCallback     callback,
1360                                               gpointer                user_data);
1361 GIO_AVAILABLE_IN_2_56
1362 GBytes  *g_file_load_bytes_finish            (GFile                  *file,
1363                                               GAsyncResult           *result,
1364                                               gchar                 **etag_out,
1365                                               GError                **error);
1366 
1367 G_END_DECLS
1368 
1369 #endif /* __G_FILE_H__ */