Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:56

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  *
0152  * An interface for writing VFS file handles.
0153  **/
0154 struct _GFileIface
0155 {
0156   GTypeInterface g_iface;
0157 
0158   /* Virtual Table */
0159 
0160   GFile *             (* dup)                         (GFile         *file);
0161   guint               (* hash)                        (GFile         *file);
0162   gboolean            (* equal)                       (GFile         *file1,
0163                                                        GFile         *file2);
0164   gboolean            (* is_native)                   (GFile         *file);
0165   gboolean            (* has_uri_scheme)              (GFile         *file,
0166                                                        const char    *uri_scheme);
0167   char *              (* get_uri_scheme)              (GFile         *file);
0168   char *              (* get_basename)                (GFile         *file);
0169   char *              (* get_path)                    (GFile         *file);
0170   char *              (* get_uri)                     (GFile         *file);
0171   char *              (* get_parse_name)              (GFile         *file);
0172   GFile *             (* get_parent)                  (GFile         *file);
0173   gboolean            (* prefix_matches)              (GFile         *prefix,
0174                                                        GFile         *file);
0175   char *              (* get_relative_path)           (GFile         *parent,
0176                                                        GFile         *descendant);
0177   GFile *             (* resolve_relative_path)       (GFile        *file,
0178                                                        const char   *relative_path);
0179   GFile *             (* get_child_for_display_name)  (GFile        *file,
0180                                                        const char   *display_name,
0181                                                        GError      **error);
0182 
0183   GFileEnumerator *   (* enumerate_children)          (GFile                *file,
0184                                                        const char           *attributes,
0185                                                        GFileQueryInfoFlags   flags,
0186                                                        GCancellable         *cancellable,
0187                                                        GError              **error);
0188   void                (* enumerate_children_async)    (GFile                *file,
0189                                                        const char           *attributes,
0190                                                        GFileQueryInfoFlags   flags,
0191                                                        int                   io_priority,
0192                                                        GCancellable         *cancellable,
0193                                                        GAsyncReadyCallback   callback,
0194                                                        gpointer              user_data);
0195   GFileEnumerator *   (* enumerate_children_finish)   (GFile                *file,
0196                                                        GAsyncResult         *res,
0197                                                        GError              **error);
0198 
0199   GFileInfo *         (* query_info)                  (GFile                *file,
0200                                                        const char           *attributes,
0201                                                        GFileQueryInfoFlags   flags,
0202                                                        GCancellable         *cancellable,
0203                                                        GError              **error);
0204   void                (* query_info_async)            (GFile                *file,
0205                                                        const char           *attributes,
0206                                                        GFileQueryInfoFlags   flags,
0207                                                        int                   io_priority,
0208                                                        GCancellable         *cancellable,
0209                                                        GAsyncReadyCallback   callback,
0210                                                        gpointer              user_data);
0211   GFileInfo *         (* query_info_finish)           (GFile                *file,
0212                                                        GAsyncResult         *res,
0213                                                        GError              **error);
0214 
0215   GFileInfo *         (* query_filesystem_info)       (GFile                *file,
0216                                                        const char           *attributes,
0217                                                        GCancellable         *cancellable,
0218                                                        GError              **error);
0219   void                (* query_filesystem_info_async) (GFile                *file,
0220                                                        const char           *attributes,
0221                                                        int                   io_priority,
0222                                                        GCancellable         *cancellable,
0223                                                        GAsyncReadyCallback   callback,
0224                                                        gpointer              user_data);
0225   GFileInfo *         (* query_filesystem_info_finish)(GFile                *file,
0226                                                        GAsyncResult         *res,
0227                                                        GError              **error);
0228 
0229   GMount *            (* find_enclosing_mount)        (GFile                *file,
0230                                                        GCancellable         *cancellable,
0231                                                        GError              **error);
0232   void                (* find_enclosing_mount_async)  (GFile                *file,
0233                                                        int                   io_priority,
0234                                                        GCancellable         *cancellable,
0235                                                        GAsyncReadyCallback   callback,
0236                                                        gpointer              user_data);
0237   GMount *            (* find_enclosing_mount_finish) (GFile                *file,
0238                                                        GAsyncResult         *res,
0239                                                        GError              **error);
0240 
0241   GFile *             (* set_display_name)            (GFile                *file,
0242                                                        const char           *display_name,
0243                                                        GCancellable         *cancellable,
0244                                                        GError              **error);
0245   void                (* set_display_name_async)      (GFile                *file,
0246                                                        const char           *display_name,
0247                                                        int                   io_priority,
0248                                                        GCancellable         *cancellable,
0249                                                        GAsyncReadyCallback   callback,
0250                                                        gpointer              user_data);
0251   GFile *             (* set_display_name_finish)     (GFile                *file,
0252                                                        GAsyncResult         *res,
0253                                                        GError              **error);
0254 
0255   GFileAttributeInfoList * (* query_settable_attributes)    (GFile          *file,
0256                                                              GCancellable   *cancellable,
0257                                                              GError        **error);
0258   void                (* _query_settable_attributes_async)  (void);
0259   void                (* _query_settable_attributes_finish) (void);
0260 
0261   GFileAttributeInfoList * (* query_writable_namespaces)    (GFile          *file,
0262                                                              GCancellable   *cancellable,
0263                                                              GError        **error);
0264   void                (* _query_writable_namespaces_async)  (void);
0265   void                (* _query_writable_namespaces_finish) (void);
0266 
0267   gboolean            (* set_attribute)               (GFile                *file,
0268                                                        const char           *attribute,
0269                                                        GFileAttributeType    type,
0270                                                        gpointer              value_p,
0271                                                        GFileQueryInfoFlags   flags,
0272                                                        GCancellable         *cancellable,
0273                                                        GError              **error);
0274   gboolean            (* set_attributes_from_info)    (GFile                *file,
0275                                                        GFileInfo            *info,
0276                                                        GFileQueryInfoFlags   flags,
0277                                                        GCancellable         *cancellable,
0278                                                        GError              **error);
0279   void                (* set_attributes_async)        (GFile                *file,
0280                                                        GFileInfo            *info,
0281                                                        GFileQueryInfoFlags   flags,
0282                                                        int                   io_priority,
0283                                                        GCancellable         *cancellable,
0284                                                        GAsyncReadyCallback   callback,
0285                                                        gpointer              user_data);
0286   gboolean            (* set_attributes_finish)       (GFile                *file,
0287                                                        GAsyncResult         *result,
0288                                                        GFileInfo           **info,
0289                                                        GError              **error);
0290 
0291   GFileInputStream *  (* read_fn)                     (GFile                *file,
0292                                                        GCancellable         *cancellable,
0293                                                        GError              **error);
0294   void                (* read_async)                  (GFile                *file,
0295                                                        int                   io_priority,
0296                                                        GCancellable         *cancellable,
0297                                                        GAsyncReadyCallback   callback,
0298                                                        gpointer              user_data);
0299   GFileInputStream *  (* read_finish)                 (GFile                *file,
0300                                                        GAsyncResult         *res,
0301                                                        GError              **error);
0302 
0303   GFileOutputStream * (* append_to)                   (GFile                *file,
0304                                                        GFileCreateFlags      flags,
0305                                                        GCancellable         *cancellable,
0306                                                        GError              **error);
0307   void                (* append_to_async)             (GFile                *file,
0308                                                        GFileCreateFlags      flags,
0309                                                        int                   io_priority,
0310                                                        GCancellable         *cancellable,
0311                                                        GAsyncReadyCallback   callback,
0312                                                        gpointer              user_data);
0313   GFileOutputStream * (* append_to_finish)            (GFile                *file,
0314                                                        GAsyncResult         *res,
0315                                                        GError              **error);
0316 
0317   GFileOutputStream * (* create)                      (GFile                *file,
0318                                                        GFileCreateFlags      flags,
0319                                                        GCancellable         *cancellable,
0320                                                        GError              **error);
0321   void                (* create_async)                (GFile                *file,
0322                                                        GFileCreateFlags      flags,
0323                                                        int                   io_priority,
0324                                                        GCancellable         *cancellable,
0325                                                        GAsyncReadyCallback   callback,
0326                                                        gpointer              user_data);
0327   GFileOutputStream * (* create_finish)               (GFile                *file,
0328                                                        GAsyncResult         *res,
0329                                                        GError              **error);
0330 
0331   GFileOutputStream * (* replace)                     (GFile                *file,
0332                                                        const char           *etag,
0333                                                        gboolean              make_backup,
0334                                                        GFileCreateFlags      flags,
0335                                                        GCancellable         *cancellable,
0336                                                        GError              **error);
0337   void                (* replace_async)               (GFile                *file,
0338                                                        const char           *etag,
0339                                                        gboolean              make_backup,
0340                                                        GFileCreateFlags      flags,
0341                                                        int                   io_priority,
0342                                                        GCancellable         *cancellable,
0343                                                        GAsyncReadyCallback   callback,
0344                                                        gpointer              user_data);
0345   GFileOutputStream * (* replace_finish)              (GFile                *file,
0346                                                        GAsyncResult         *res,
0347                                                        GError              **error);
0348 
0349   gboolean            (* delete_file)                 (GFile                *file,
0350                                                        GCancellable         *cancellable,
0351                                                        GError              **error);
0352   void                (* delete_file_async)           (GFile                *file,
0353                                int                   io_priority,
0354                                GCancellable         *cancellable,
0355                                GAsyncReadyCallback   callback,
0356                                gpointer              user_data);
0357   gboolean            (* delete_file_finish)          (GFile                *file,
0358                                GAsyncResult         *result,
0359                                GError              **error);
0360 
0361   gboolean            (* trash)                       (GFile                *file,
0362                                                        GCancellable         *cancellable,
0363                                                        GError              **error);
0364   void                (* trash_async)                 (GFile                *file,
0365                                int                   io_priority,
0366                                GCancellable         *cancellable,
0367                                GAsyncReadyCallback   callback,
0368                                gpointer              user_data);
0369   gboolean            (* trash_finish)                (GFile                *file,
0370                                GAsyncResult         *result,
0371                                GError              **error);
0372 
0373   gboolean            (* make_directory)              (GFile                *file,
0374                                                        GCancellable         *cancellable,
0375                                                        GError              **error);
0376   void                (* make_directory_async)        (GFile                *file,
0377                                                        int                   io_priority,
0378                                                        GCancellable         *cancellable,
0379                                                        GAsyncReadyCallback   callback,
0380                                                        gpointer              user_data);
0381   gboolean            (* make_directory_finish)       (GFile                *file,
0382                                                        GAsyncResult         *result,
0383                                                        GError              **error);
0384 
0385   gboolean            (* make_symbolic_link)          (GFile                *file,
0386                                                        const char           *symlink_value,
0387                                                        GCancellable         *cancellable,
0388                                                        GError              **error);
0389   void                (* make_symbolic_link_async)    (GFile                *file,
0390                                                        const char           *symlink_value,
0391                                                        int                   io_priority,
0392                                                        GCancellable         *cancellable,
0393                                                        GAsyncReadyCallback   callback,
0394                                                        gpointer              user_data);
0395   gboolean            (* make_symbolic_link_finish)   (GFile                 *file,
0396                                                        GAsyncResult         *result,
0397                                                        GError              **error);
0398 
0399   gboolean            (* copy)                        (GFile                *source,
0400                                                        GFile                *destination,
0401                                                        GFileCopyFlags        flags,
0402                                                        GCancellable         *cancellable,
0403                                                        GFileProgressCallback progress_callback,
0404                                                        gpointer              progress_callback_data,
0405                                                        GError              **error);
0406   void                (* copy_async)                  (GFile                *source,
0407                                                        GFile                *destination,
0408                                                        GFileCopyFlags        flags,
0409                                                        int                   io_priority,
0410                                                        GCancellable         *cancellable,
0411                                                        GFileProgressCallback progress_callback,
0412                                                        gpointer              progress_callback_data,
0413                                                        GAsyncReadyCallback   callback,
0414                                                        gpointer              user_data);
0415   gboolean            (* copy_finish)                 (GFile                *file,
0416                                                        GAsyncResult         *res,
0417                                                        GError              **error);
0418 
0419   gboolean            (* move)                        (GFile                *source,
0420                                                        GFile                *destination,
0421                                                        GFileCopyFlags        flags,
0422                                                        GCancellable         *cancellable,
0423                                                        GFileProgressCallback progress_callback,
0424                                                        gpointer              progress_callback_data,
0425                                                        GError              **error);
0426   void                (* move_async)                  (GFile                *source,
0427                                                        GFile                *destination,
0428                                                        GFileCopyFlags        flags,
0429                                                        int                   io_priority,
0430                                                        GCancellable         *cancellable,
0431                                                        GFileProgressCallback progress_callback,
0432                                                        gpointer              progress_callback_data,
0433                                                        GAsyncReadyCallback   callback,
0434                                                        gpointer              user_data);
0435   gboolean            (* move_finish)                 (GFile                *file,
0436                                                        GAsyncResult         *result,
0437                                                        GError              **error);
0438 
0439   void                (* mount_mountable)             (GFile                *file,
0440                                                        GMountMountFlags      flags,
0441                                                        GMountOperation      *mount_operation,
0442                                                        GCancellable         *cancellable,
0443                                                        GAsyncReadyCallback   callback,
0444                                                        gpointer              user_data);
0445   GFile *             (* mount_mountable_finish)      (GFile                *file,
0446                                                        GAsyncResult         *result,
0447                                                        GError              **error);
0448 
0449   void                (* unmount_mountable)           (GFile                *file,
0450                                                        GMountUnmountFlags    flags,
0451                                                        GCancellable         *cancellable,
0452                                                        GAsyncReadyCallback   callback,
0453                                                        gpointer              user_data);
0454   gboolean            (* unmount_mountable_finish)    (GFile                *file,
0455                                                        GAsyncResult         *result,
0456                                                        GError              **error);
0457 
0458   void                (* eject_mountable)             (GFile                *file,
0459                                                        GMountUnmountFlags    flags,
0460                                                        GCancellable         *cancellable,
0461                                                        GAsyncReadyCallback   callback,
0462                                                        gpointer              user_data);
0463   gboolean            (* eject_mountable_finish)      (GFile                *file,
0464                                                        GAsyncResult         *result,
0465                                                        GError              **error);
0466 
0467   void                (* mount_enclosing_volume)      (GFile                *location,
0468                                                        GMountMountFlags      flags,
0469                                                        GMountOperation      *mount_operation,
0470                                                        GCancellable         *cancellable,
0471                                                        GAsyncReadyCallback   callback,
0472                                                        gpointer              user_data);
0473   gboolean         (* mount_enclosing_volume_finish)  (GFile                *location,
0474                                                        GAsyncResult         *result,
0475                                                        GError              **error);
0476 
0477   GFileMonitor *      (* monitor_dir)                 (GFile                *file,
0478                                                        GFileMonitorFlags     flags,
0479                                                        GCancellable         *cancellable,
0480                                                        GError              **error);
0481   GFileMonitor *      (* monitor_file)                (GFile                *file,
0482                                                        GFileMonitorFlags     flags,
0483                                                        GCancellable         *cancellable,
0484                                                        GError              **error);
0485 
0486   GFileIOStream *     (* open_readwrite)              (GFile                *file,
0487                                                        GCancellable         *cancellable,
0488                                                        GError              **error);
0489   void                (* open_readwrite_async)        (GFile                *file,
0490                                                        int                   io_priority,
0491                                                        GCancellable         *cancellable,
0492                                                        GAsyncReadyCallback   callback,
0493                                                        gpointer              user_data);
0494   GFileIOStream *     (* open_readwrite_finish)       (GFile                *file,
0495                                                        GAsyncResult         *res,
0496                                                        GError              **error);
0497   GFileIOStream *     (* create_readwrite)            (GFile                *file,
0498                                GFileCreateFlags      flags,
0499                                                        GCancellable         *cancellable,
0500                                                        GError              **error);
0501   void                (* create_readwrite_async)      (GFile                *file,
0502                                GFileCreateFlags      flags,
0503                                                        int                   io_priority,
0504                                                        GCancellable         *cancellable,
0505                                                        GAsyncReadyCallback   callback,
0506                                                        gpointer              user_data);
0507   GFileIOStream *     (* create_readwrite_finish)      (GFile                *file,
0508                                                        GAsyncResult         *res,
0509                                                        GError              **error);
0510   GFileIOStream *     (* replace_readwrite)           (GFile                *file,
0511                                                        const char           *etag,
0512                                                        gboolean              make_backup,
0513                                                        GFileCreateFlags      flags,
0514                                                        GCancellable         *cancellable,
0515                                                        GError              **error);
0516   void                (* replace_readwrite_async)     (GFile                *file,
0517                                                        const char           *etag,
0518                                                        gboolean              make_backup,
0519                                                        GFileCreateFlags      flags,
0520                                                        int                   io_priority,
0521                                                        GCancellable         *cancellable,
0522                                                        GAsyncReadyCallback   callback,
0523                                                        gpointer              user_data);
0524   GFileIOStream *     (* replace_readwrite_finish)    (GFile                *file,
0525                                                        GAsyncResult         *res,
0526                                                        GError              **error);
0527 
0528   void                (* start_mountable)             (GFile                *file,
0529                                                        GDriveStartFlags      flags,
0530                                                        GMountOperation      *start_operation,
0531                                                        GCancellable         *cancellable,
0532                                                        GAsyncReadyCallback   callback,
0533                                                        gpointer              user_data);
0534   gboolean            (* start_mountable_finish)      (GFile                *file,
0535                                                        GAsyncResult         *result,
0536                                                        GError              **error);
0537 
0538   void                (* stop_mountable)              (GFile                *file,
0539                                                        GMountUnmountFlags    flags,
0540                                                        GMountOperation      *mount_operation,
0541                                                        GCancellable         *cancellable,
0542                                                        GAsyncReadyCallback   callback,
0543                                                        gpointer              user_data);
0544   gboolean            (* stop_mountable_finish)       (GFile                *file,
0545                                                        GAsyncResult         *result,
0546                                                        GError              **error);
0547 
0548   gboolean            supports_thread_contexts;
0549 
0550   void                (* unmount_mountable_with_operation) (GFile           *file,
0551                                                        GMountUnmountFlags    flags,
0552                                                        GMountOperation      *mount_operation,
0553                                                        GCancellable         *cancellable,
0554                                                        GAsyncReadyCallback   callback,
0555                                                        gpointer              user_data);
0556   gboolean            (* unmount_mountable_with_operation_finish) (GFile    *file,
0557                                                        GAsyncResult         *result,
0558                                                        GError              **error);
0559 
0560   void                (* eject_mountable_with_operation) (GFile             *file,
0561                                                        GMountUnmountFlags    flags,
0562                                                        GMountOperation      *mount_operation,
0563                                                        GCancellable         *cancellable,
0564                                                        GAsyncReadyCallback   callback,
0565                                                        gpointer              user_data);
0566   gboolean            (* eject_mountable_with_operation_finish) (GFile      *file,
0567                                                        GAsyncResult         *result,
0568                                                        GError              **error);
0569 
0570   void                (* poll_mountable)              (GFile                *file,
0571                                                        GCancellable         *cancellable,
0572                                                        GAsyncReadyCallback   callback,
0573                                                        gpointer              user_data);
0574   gboolean            (* poll_mountable_finish)       (GFile                *file,
0575                                                        GAsyncResult         *result,
0576                                                        GError              **error);
0577 
0578   gboolean            (* measure_disk_usage)          (GFile                         *file,
0579                                                        GFileMeasureFlags              flags,
0580                                                        GCancellable                  *cancellable,
0581                                                        GFileMeasureProgressCallback   progress_callback,
0582                                                        gpointer                       progress_data,
0583                                                        guint64                       *disk_usage,
0584                                                        guint64                       *num_dirs,
0585                                                        guint64                       *num_files,
0586                                                        GError                       **error);
0587   void                (* measure_disk_usage_async)    (GFile                         *file,
0588                                                        GFileMeasureFlags              flags,
0589                                                        gint                           io_priority,
0590                                                        GCancellable                  *cancellable,
0591                                                        GFileMeasureProgressCallback   progress_callback,
0592                                                        gpointer                       progress_data,
0593                                                        GAsyncReadyCallback            callback,
0594                                                        gpointer                       user_data);
0595   gboolean            (* measure_disk_usage_finish)   (GFile                         *file,
0596                                                        GAsyncResult                  *result,
0597                                                        guint64                       *disk_usage,
0598                                                        guint64                       *num_dirs,
0599                                                        guint64                       *num_files,
0600                                                        GError                       **error);
0601 };
0602 
0603 GIO_AVAILABLE_IN_ALL
0604 GType                   g_file_get_type                   (void) G_GNUC_CONST;
0605 
0606 GIO_AVAILABLE_IN_ALL
0607 GFile *                 g_file_new_for_path               (const char                 *path);
0608 GIO_AVAILABLE_IN_ALL
0609 GFile *                 g_file_new_for_uri                (const char                 *uri);
0610 GIO_AVAILABLE_IN_ALL
0611 GFile *                 g_file_new_for_commandline_arg    (const char                 *arg);
0612 GIO_AVAILABLE_IN_2_36
0613 GFile *                 g_file_new_for_commandline_arg_and_cwd (const gchar           *arg,
0614                                                                 const gchar           *cwd);
0615 GIO_AVAILABLE_IN_2_32
0616 GFile *                 g_file_new_tmp                    (const char                 *tmpl,
0617                                                            GFileIOStream             **iostream,
0618                                                            GError                    **error);
0619 GIO_AVAILABLE_IN_2_74
0620 void                    g_file_new_tmp_async              (const char                 *tmpl,
0621                                                            int                         io_priority,
0622                                                            GCancellable               *cancellable,
0623                                                            GAsyncReadyCallback         callback,
0624                                                            gpointer                    user_data);
0625 GIO_AVAILABLE_IN_2_74
0626 GFile *                 g_file_new_tmp_finish             (GAsyncResult               *result,
0627                                                            GFileIOStream             **iostream,
0628                                                            GError                    **error);
0629 GIO_AVAILABLE_IN_2_74
0630 void                    g_file_new_tmp_dir_async          (const char                 *tmpl,
0631                                                            int                         io_priority,
0632                                                            GCancellable               *cancellable,
0633                                                            GAsyncReadyCallback         callback,
0634                                                            gpointer                    user_data);
0635 GIO_AVAILABLE_IN_2_74
0636 GFile *                 g_file_new_tmp_dir_finish         (GAsyncResult               *result,
0637                                                            GError                    **error);
0638 GIO_AVAILABLE_IN_ALL
0639 GFile *                 g_file_parse_name                 (const char                 *parse_name);
0640 GIO_AVAILABLE_IN_2_56
0641 GFile *                 g_file_new_build_filename         (const gchar                *first_element,
0642                                                            ...) G_GNUC_NULL_TERMINATED;
0643 GIO_AVAILABLE_IN_2_78
0644 GFile *                 g_file_new_build_filenamev        (const gchar                * const *args);
0645 GIO_AVAILABLE_IN_ALL
0646 GFile *                 g_file_dup                        (GFile                      *file);
0647 GIO_AVAILABLE_IN_ALL
0648 guint                   g_file_hash                       (gconstpointer               file);
0649 GIO_AVAILABLE_IN_ALL
0650 gboolean                g_file_equal                      (GFile                      *file1,
0651                                GFile                      *file2);
0652 GIO_AVAILABLE_IN_ALL
0653 char *                  g_file_get_basename               (GFile                      *file);
0654 GIO_AVAILABLE_IN_ALL
0655 char *                  g_file_get_path                   (GFile                      *file);
0656 GIO_AVAILABLE_IN_2_56
0657 const char *            g_file_peek_path                  (GFile                      *file);
0658 GIO_AVAILABLE_IN_ALL
0659 char *                  g_file_get_uri                    (GFile                      *file);
0660 GIO_AVAILABLE_IN_ALL
0661 char *                  g_file_get_parse_name             (GFile                      *file);
0662 GIO_AVAILABLE_IN_ALL
0663 GFile *                 g_file_get_parent                 (GFile                      *file);
0664 GIO_AVAILABLE_IN_ALL
0665 gboolean                g_file_has_parent                 (GFile                      *file,
0666                                                            GFile                      *parent);
0667 GIO_AVAILABLE_IN_ALL
0668 GFile *                 g_file_get_child                  (GFile                      *file,
0669                                const char                 *name);
0670 GIO_AVAILABLE_IN_ALL
0671 GFile *                 g_file_get_child_for_display_name (GFile                      *file,
0672                                const char                 *display_name,
0673                                GError                    **error);
0674 GIO_AVAILABLE_IN_ALL
0675 gboolean                g_file_has_prefix                 (GFile                      *file,
0676                                GFile                      *prefix);
0677 GIO_AVAILABLE_IN_ALL
0678 char *                  g_file_get_relative_path          (GFile                      *parent,
0679                                GFile                      *descendant);
0680 GIO_AVAILABLE_IN_ALL
0681 GFile *                 g_file_resolve_relative_path      (GFile                      *file,
0682                                const char                 *relative_path);
0683 GIO_AVAILABLE_IN_ALL
0684 gboolean                g_file_is_native                  (GFile                      *file);
0685 GIO_AVAILABLE_IN_ALL
0686 gboolean                g_file_has_uri_scheme             (GFile                      *file,
0687                                const char                 *uri_scheme);
0688 GIO_AVAILABLE_IN_ALL
0689 char *                  g_file_get_uri_scheme             (GFile                      *file);
0690 GIO_AVAILABLE_IN_ALL
0691 GFileInputStream *      g_file_read                       (GFile                      *file,
0692                                GCancellable               *cancellable,
0693                                GError                    **error);
0694 GIO_AVAILABLE_IN_ALL
0695 void                    g_file_read_async                 (GFile                      *file,
0696                                int                         io_priority,
0697                                GCancellable               *cancellable,
0698                                GAsyncReadyCallback         callback,
0699                                gpointer                    user_data);
0700 GIO_AVAILABLE_IN_ALL
0701 GFileInputStream *      g_file_read_finish                (GFile                      *file,
0702                                GAsyncResult               *res,
0703                                GError                    **error);
0704 GIO_AVAILABLE_IN_ALL
0705 GFileOutputStream *     g_file_append_to                  (GFile                      *file,
0706                                GFileCreateFlags             flags,
0707                                GCancellable               *cancellable,
0708                                GError                    **error);
0709 GIO_AVAILABLE_IN_ALL
0710 GFileOutputStream *     g_file_create                     (GFile                      *file,
0711                                GFileCreateFlags             flags,
0712                                GCancellable               *cancellable,
0713                                GError                    **error);
0714 GIO_AVAILABLE_IN_ALL
0715 GFileOutputStream *     g_file_replace                    (GFile                      *file,
0716                                const char                 *etag,
0717                                gboolean                    make_backup,
0718                                GFileCreateFlags            flags,
0719                                GCancellable               *cancellable,
0720                                GError                    **error);
0721 GIO_AVAILABLE_IN_ALL
0722 void                    g_file_append_to_async            (GFile                      *file,
0723                                GFileCreateFlags            flags,
0724                                int                         io_priority,
0725                                GCancellable               *cancellable,
0726                                GAsyncReadyCallback         callback,
0727                                gpointer                    user_data);
0728 GIO_AVAILABLE_IN_ALL
0729 GFileOutputStream *     g_file_append_to_finish           (GFile                      *file,
0730                                GAsyncResult               *res,
0731                                GError                    **error);
0732 GIO_AVAILABLE_IN_ALL
0733 void                    g_file_create_async               (GFile                      *file,
0734                                GFileCreateFlags            flags,
0735                                int                         io_priority,
0736                                GCancellable               *cancellable,
0737                                GAsyncReadyCallback         callback,
0738                                gpointer                    user_data);
0739 GIO_AVAILABLE_IN_ALL
0740 GFileOutputStream *     g_file_create_finish              (GFile                      *file,
0741                                GAsyncResult               *res,
0742                                GError                    **error);
0743 GIO_AVAILABLE_IN_ALL
0744 void                    g_file_replace_async              (GFile                      *file,
0745                                const char                 *etag,
0746                                gboolean                    make_backup,
0747                                GFileCreateFlags            flags,
0748                                int                         io_priority,
0749                                GCancellable               *cancellable,
0750                                GAsyncReadyCallback         callback,
0751                                gpointer                    user_data);
0752 GIO_AVAILABLE_IN_ALL
0753 GFileOutputStream *     g_file_replace_finish             (GFile                      *file,
0754                                GAsyncResult               *res,
0755                                GError                    **error);
0756 GIO_AVAILABLE_IN_ALL
0757 GFileIOStream *         g_file_open_readwrite             (GFile                      *file,
0758                                GCancellable               *cancellable,
0759                                GError                    **error);
0760 GIO_AVAILABLE_IN_ALL
0761 void                    g_file_open_readwrite_async       (GFile                      *file,
0762                                int                         io_priority,
0763                                GCancellable               *cancellable,
0764                                GAsyncReadyCallback         callback,
0765                                gpointer                    user_data);
0766 GIO_AVAILABLE_IN_ALL
0767 GFileIOStream *         g_file_open_readwrite_finish      (GFile                      *file,
0768                                GAsyncResult               *res,
0769                                GError                    **error);
0770 GIO_AVAILABLE_IN_ALL
0771 GFileIOStream *         g_file_create_readwrite           (GFile                      *file,
0772                                GFileCreateFlags            flags,
0773                                GCancellable               *cancellable,
0774                                GError                    **error);
0775 GIO_AVAILABLE_IN_ALL
0776 void                    g_file_create_readwrite_async     (GFile                      *file,
0777                                GFileCreateFlags            flags,
0778                                int                         io_priority,
0779                                GCancellable               *cancellable,
0780                                GAsyncReadyCallback         callback,
0781                                gpointer                    user_data);
0782 GIO_AVAILABLE_IN_ALL
0783 GFileIOStream *         g_file_create_readwrite_finish    (GFile                      *file,
0784                                GAsyncResult               *res,
0785                                GError                    **error);
0786 GIO_AVAILABLE_IN_ALL
0787 GFileIOStream *         g_file_replace_readwrite          (GFile                      *file,
0788                                const char                 *etag,
0789                                gboolean                    make_backup,
0790                                GFileCreateFlags            flags,
0791                                GCancellable               *cancellable,
0792                                GError                    **error);
0793 GIO_AVAILABLE_IN_ALL
0794 void                    g_file_replace_readwrite_async    (GFile                      *file,
0795                                const char                 *etag,
0796                                gboolean                    make_backup,
0797                                GFileCreateFlags            flags,
0798                                int                         io_priority,
0799                                GCancellable               *cancellable,
0800                                GAsyncReadyCallback         callback,
0801                                gpointer                    user_data);
0802 GIO_AVAILABLE_IN_ALL
0803 GFileIOStream *         g_file_replace_readwrite_finish   (GFile                      *file,
0804                                GAsyncResult               *res,
0805                                GError                    **error);
0806 GIO_AVAILABLE_IN_ALL
0807 gboolean                g_file_query_exists               (GFile                      *file,
0808                                GCancellable               *cancellable);
0809 GIO_AVAILABLE_IN_ALL
0810 GFileType               g_file_query_file_type            (GFile                      *file,
0811                                                            GFileQueryInfoFlags         flags,
0812                                                            GCancellable               *cancellable);
0813 GIO_AVAILABLE_IN_ALL
0814 GFileInfo *             g_file_query_info                 (GFile                      *file,
0815                                const char                 *attributes,
0816                                GFileQueryInfoFlags         flags,
0817                                GCancellable               *cancellable,
0818                                GError                    **error);
0819 GIO_AVAILABLE_IN_ALL
0820 void                    g_file_query_info_async           (GFile                      *file,
0821                                const char                 *attributes,
0822                                GFileQueryInfoFlags         flags,
0823                                int                         io_priority,
0824                                GCancellable               *cancellable,
0825                                GAsyncReadyCallback         callback,
0826                                gpointer                    user_data);
0827 GIO_AVAILABLE_IN_ALL
0828 GFileInfo *             g_file_query_info_finish          (GFile                      *file,
0829                                GAsyncResult               *res,
0830                                GError                    **error);
0831 GIO_AVAILABLE_IN_ALL
0832 GFileInfo *             g_file_query_filesystem_info      (GFile                      *file,
0833                                const char                 *attributes,
0834                                GCancellable               *cancellable,
0835                                GError                    **error);
0836 GIO_AVAILABLE_IN_ALL
0837 void                    g_file_query_filesystem_info_async (GFile                      *file,
0838                                const char                 *attributes,
0839                                int                         io_priority,
0840                                GCancellable               *cancellable,
0841                                GAsyncReadyCallback         callback,
0842                                gpointer                    user_data);
0843 GIO_AVAILABLE_IN_ALL
0844 GFileInfo *             g_file_query_filesystem_info_finish (GFile                      *file,
0845                                                            GAsyncResult               *res,
0846                                GError                    **error);
0847 GIO_AVAILABLE_IN_ALL
0848 GMount *                g_file_find_enclosing_mount       (GFile                      *file,
0849                                                            GCancellable               *cancellable,
0850                                                            GError                    **error);
0851 GIO_AVAILABLE_IN_ALL
0852 void                    g_file_find_enclosing_mount_async (GFile                      *file,
0853                                int                         io_priority,
0854                                GCancellable               *cancellable,
0855                                GAsyncReadyCallback         callback,
0856                                gpointer                    user_data);
0857 GIO_AVAILABLE_IN_ALL
0858 GMount *                g_file_find_enclosing_mount_finish (GFile                     *file,
0859                                 GAsyncResult              *res,
0860                                 GError                   **error);
0861 GIO_AVAILABLE_IN_ALL
0862 GFileEnumerator *       g_file_enumerate_children         (GFile                      *file,
0863                                const char                 *attributes,
0864                                GFileQueryInfoFlags         flags,
0865                                GCancellable               *cancellable,
0866                                GError                    **error);
0867 GIO_AVAILABLE_IN_ALL
0868 void                    g_file_enumerate_children_async   (GFile                      *file,
0869                                const char                 *attributes,
0870                                GFileQueryInfoFlags         flags,
0871                                int                         io_priority,
0872                                GCancellable               *cancellable,
0873                                GAsyncReadyCallback         callback,
0874                                gpointer                    user_data);
0875 GIO_AVAILABLE_IN_ALL
0876 GFileEnumerator *       g_file_enumerate_children_finish  (GFile                      *file,
0877                                GAsyncResult               *res,
0878                                GError                    **error);
0879 GIO_AVAILABLE_IN_ALL
0880 GFile *                 g_file_set_display_name           (GFile                      *file,
0881                                const char                 *display_name,
0882                                GCancellable               *cancellable,
0883                                GError                    **error);
0884 GIO_AVAILABLE_IN_ALL
0885 void                    g_file_set_display_name_async     (GFile                      *file,
0886                                const char                 *display_name,
0887                                int                         io_priority,
0888                                GCancellable               *cancellable,
0889                                GAsyncReadyCallback         callback,
0890                                gpointer                    user_data);
0891 GIO_AVAILABLE_IN_ALL
0892 GFile *                 g_file_set_display_name_finish    (GFile                      *file,
0893                                GAsyncResult               *res,
0894                                GError                    **error);
0895 GIO_AVAILABLE_IN_ALL
0896 gboolean                g_file_delete                     (GFile                      *file,
0897                                GCancellable               *cancellable,
0898                                GError                    **error);
0899 
0900 GIO_AVAILABLE_IN_2_34
0901 void                    g_file_delete_async               (GFile                      *file,
0902                                int                         io_priority,
0903                                GCancellable               *cancellable,
0904                                GAsyncReadyCallback         callback,
0905                                gpointer                    user_data);
0906 
0907 GIO_AVAILABLE_IN_2_34
0908 gboolean                g_file_delete_finish              (GFile                      *file,
0909                                GAsyncResult               *result,
0910                                GError                    **error);
0911 
0912 GIO_AVAILABLE_IN_ALL
0913 gboolean                g_file_trash                      (GFile                      *file,
0914                                GCancellable               *cancellable,
0915                                GError                    **error);
0916 
0917 GIO_AVAILABLE_IN_2_38
0918 void                    g_file_trash_async                (GFile                      *file,
0919                                int                         io_priority,
0920                                GCancellable               *cancellable,
0921                                GAsyncReadyCallback         callback,
0922                                gpointer                    user_data);
0923 
0924 GIO_AVAILABLE_IN_2_38
0925 gboolean                g_file_trash_finish               (GFile                      *file,
0926                                GAsyncResult               *result,
0927                                GError                    **error);
0928 
0929 GIO_AVAILABLE_IN_ALL
0930 gboolean                g_file_copy                       (GFile                      *source,
0931                                GFile                      *destination,
0932                                GFileCopyFlags              flags,
0933                                GCancellable               *cancellable,
0934                                GFileProgressCallback       progress_callback,
0935                                gpointer                    progress_callback_data,
0936                                GError                    **error);
0937 GIO_AVAILABLE_IN_ALL
0938 void                    g_file_copy_async                 (GFile                      *source,
0939                                GFile                      *destination,
0940                                GFileCopyFlags              flags,
0941                                int                         io_priority,
0942                                GCancellable               *cancellable,
0943                                GFileProgressCallback       progress_callback,
0944                                gpointer                    progress_callback_data,
0945                                GAsyncReadyCallback         callback,
0946                                gpointer                    user_data);
0947 GIO_AVAILABLE_IN_2_82
0948 void g_file_copy_async_with_closures (GFile *source,
0949                                       GFile *destination,
0950                                       GFileCopyFlags flags,
0951                                       int io_priority,
0952                                       GCancellable *cancellable,
0953                                       GClosure *progress_callback_closure,
0954                                       GClosure *ready_callback_closure);
0955 GIO_AVAILABLE_IN_ALL
0956 gboolean                g_file_copy_finish                (GFile                      *file,
0957                                GAsyncResult               *res,
0958                                GError                    **error);
0959 GIO_AVAILABLE_IN_ALL
0960 gboolean                g_file_move                       (GFile                      *source,
0961                                GFile                      *destination,
0962                                GFileCopyFlags              flags,
0963                                GCancellable               *cancellable,
0964                                GFileProgressCallback       progress_callback,
0965                                gpointer                    progress_callback_data,
0966                                GError                    **error);
0967 GIO_AVAILABLE_IN_2_72
0968 void                    g_file_move_async                 (GFile                      *source,
0969                                                                          GFile                      *destination,
0970                                                                          GFileCopyFlags              flags,
0971                                                                          int                         io_priority,
0972                                                                          GCancellable               *cancellable,
0973                                                                          GFileProgressCallback       progress_callback,
0974                                                                          gpointer                    progress_callback_data,
0975                                                                          GAsyncReadyCallback         callback,
0976                                                                          gpointer                    user_data);
0977 GIO_AVAILABLE_IN_2_82
0978 void g_file_move_async_with_closures (GFile *source,
0979                                       GFile *destination,
0980                                       GFileCopyFlags flags,
0981                                       int io_priority,
0982                                       GCancellable *cancellable,
0983                                       GClosure *progress_callback_closure,
0984                                       GClosure *ready_callback_closure);
0985 GIO_AVAILABLE_IN_2_72
0986 gboolean                g_file_move_finish                (GFile                      *file,
0987                                                                          GAsyncResult               *result,
0988                                                                          GError                    **error);
0989 GIO_AVAILABLE_IN_ALL
0990 gboolean                g_file_make_directory             (GFile                      *file,
0991                                GCancellable               *cancellable,
0992                                GError                    **error);
0993 GIO_AVAILABLE_IN_2_38
0994 void                    g_file_make_directory_async       (GFile                      *file,
0995                                                            int                         io_priority,
0996                                                            GCancellable               *cancellable,
0997                                                            GAsyncReadyCallback         callback,
0998                                                            gpointer                    user_data);
0999 GIO_AVAILABLE_IN_2_38
1000 gboolean                g_file_make_directory_finish      (GFile                      *file,
1001                                                            GAsyncResult               *result,
1002                                                            GError                    **error);
1003 
1004 GIO_AVAILABLE_IN_ALL
1005 gboolean                g_file_make_directory_with_parents (GFile                     *file,
1006                                                    GCancellable               *cancellable,
1007                                                    GError                    **error);
1008 GIO_AVAILABLE_IN_ALL
1009 gboolean                g_file_make_symbolic_link         (GFile                      *file,
1010                                const char                 *symlink_value,
1011                                GCancellable               *cancellable,
1012                                GError                    **error);
1013 GIO_AVAILABLE_IN_2_74
1014 void                    g_file_make_symbolic_link_async   (GFile                      *file,
1015                                                            const char                 *symlink_value,
1016                                                            int                         io_priority,
1017                                                            GCancellable               *cancellable,
1018                                                            GAsyncReadyCallback         callback,
1019                                                            gpointer                    user_data);
1020 GIO_AVAILABLE_IN_2_74
1021 gboolean                g_file_make_symbolic_link_finish  (GFile                      *file,
1022                                                            GAsyncResult               *result,
1023                                                            GError                    **error);
1024 GIO_AVAILABLE_IN_ALL
1025 GFileAttributeInfoList *g_file_query_settable_attributes  (GFile                      *file,
1026                                GCancellable               *cancellable,
1027                                GError                    **error);
1028 GIO_AVAILABLE_IN_ALL
1029 GFileAttributeInfoList *g_file_query_writable_namespaces  (GFile                      *file,
1030                                GCancellable               *cancellable,
1031                                GError                    **error);
1032 GIO_AVAILABLE_IN_ALL
1033 gboolean                g_file_set_attribute              (GFile                      *file,
1034                                const char                 *attribute,
1035                                GFileAttributeType          type,
1036                                gpointer                    value_p,
1037                                GFileQueryInfoFlags         flags,
1038                                GCancellable               *cancellable,
1039                                GError                    **error);
1040 GIO_AVAILABLE_IN_ALL
1041 gboolean                g_file_set_attributes_from_info   (GFile                      *file,
1042                                GFileInfo                  *info,
1043                                GFileQueryInfoFlags         flags,
1044                                GCancellable               *cancellable,
1045                                GError                    **error);
1046 GIO_AVAILABLE_IN_ALL
1047 void                    g_file_set_attributes_async       (GFile                      *file,
1048                                GFileInfo                  *info,
1049                                GFileQueryInfoFlags         flags,
1050                                int                         io_priority,
1051                                GCancellable               *cancellable,
1052                                GAsyncReadyCallback         callback,
1053                                gpointer                    user_data);
1054 GIO_AVAILABLE_IN_ALL
1055 gboolean                g_file_set_attributes_finish      (GFile                      *file,
1056                                GAsyncResult               *result,
1057                                GFileInfo                 **info,
1058                                GError                    **error);
1059 GIO_AVAILABLE_IN_ALL
1060 gboolean                g_file_set_attribute_string       (GFile                      *file,
1061                                const char                 *attribute,
1062                                const char                 *value,
1063                                GFileQueryInfoFlags         flags,
1064                                GCancellable               *cancellable,
1065                                GError                    **error);
1066 GIO_AVAILABLE_IN_ALL
1067 gboolean                g_file_set_attribute_byte_string  (GFile                      *file,
1068                                const char                 *attribute,
1069                                const char                 *value,
1070                                GFileQueryInfoFlags         flags,
1071                                GCancellable               *cancellable,
1072                                GError                    **error);
1073 GIO_AVAILABLE_IN_ALL
1074 gboolean                g_file_set_attribute_uint32       (GFile                      *file,
1075                                const char                 *attribute,
1076                                guint32                     value,
1077                                GFileQueryInfoFlags         flags,
1078                                GCancellable               *cancellable,
1079                                GError                    **error);
1080 GIO_AVAILABLE_IN_ALL
1081 gboolean                g_file_set_attribute_int32        (GFile                      *file,
1082                                const char                 *attribute,
1083                                gint32                      value,
1084                                GFileQueryInfoFlags         flags,
1085                                GCancellable               *cancellable,
1086                                GError                    **error);
1087 GIO_AVAILABLE_IN_ALL
1088 gboolean                g_file_set_attribute_uint64       (GFile                      *file,
1089                                const char                 *attribute,
1090                                guint64                     value,
1091                                GFileQueryInfoFlags         flags,
1092                                GCancellable               *cancellable,
1093                                GError                    **error);
1094 GIO_AVAILABLE_IN_ALL
1095 gboolean                g_file_set_attribute_int64        (GFile                      *file,
1096                                const char                 *attribute,
1097                                gint64                      value,
1098                                GFileQueryInfoFlags         flags,
1099                                GCancellable               *cancellable,
1100                                GError                    **error);
1101 GIO_AVAILABLE_IN_ALL
1102 void                    g_file_mount_enclosing_volume     (GFile                      *location,
1103                                GMountMountFlags            flags,
1104                                GMountOperation            *mount_operation,
1105                                GCancellable               *cancellable,
1106                                GAsyncReadyCallback         callback,
1107                                gpointer                    user_data);
1108 GIO_AVAILABLE_IN_ALL
1109 gboolean                g_file_mount_enclosing_volume_finish (GFile                      *location,
1110                                GAsyncResult               *result,
1111                                GError                    **error);
1112 GIO_AVAILABLE_IN_ALL
1113 void                    g_file_mount_mountable            (GFile                      *file,
1114                                GMountMountFlags            flags,
1115                                GMountOperation            *mount_operation,
1116                                GCancellable               *cancellable,
1117                                GAsyncReadyCallback         callback,
1118                                gpointer                    user_data);
1119 GIO_AVAILABLE_IN_ALL
1120 GFile *                 g_file_mount_mountable_finish     (GFile                      *file,
1121                                GAsyncResult               *result,
1122                                GError                    **error);
1123 GIO_DEPRECATED_FOR(g_file_unmount_mountable_with_operation)
1124 void                    g_file_unmount_mountable          (GFile                      *file,
1125                                                            GMountUnmountFlags          flags,
1126                                                            GCancellable               *cancellable,
1127                                                            GAsyncReadyCallback         callback,
1128                                                            gpointer                    user_data);
1129 
1130 GIO_DEPRECATED_FOR(g_file_unmount_mountable_with_operation_finish)
1131 gboolean                g_file_unmount_mountable_finish   (GFile                      *file,
1132                                                            GAsyncResult               *result,
1133                                                            GError                    **error);
1134 GIO_AVAILABLE_IN_ALL
1135 void                    g_file_unmount_mountable_with_operation (GFile                *file,
1136                                GMountUnmountFlags          flags,
1137                                GMountOperation            *mount_operation,
1138                                GCancellable               *cancellable,
1139                                GAsyncReadyCallback         callback,
1140                                gpointer                    user_data);
1141 GIO_AVAILABLE_IN_ALL
1142 gboolean                g_file_unmount_mountable_with_operation_finish (GFile         *file,
1143                                GAsyncResult               *result,
1144                                GError                    **error);
1145 GIO_DEPRECATED_FOR(g_file_eject_mountable_with_operation)
1146 void                    g_file_eject_mountable            (GFile                      *file,
1147                                                            GMountUnmountFlags          flags,
1148                                                            GCancellable               *cancellable,
1149                                                            GAsyncReadyCallback         callback,
1150                                                            gpointer                    user_data);
1151 
1152 GIO_DEPRECATED_FOR(g_file_eject_mountable_with_operation_finish)
1153 gboolean                g_file_eject_mountable_finish     (GFile                      *file,
1154                                                            GAsyncResult               *result,
1155                                                            GError                    **error);
1156 GIO_AVAILABLE_IN_ALL
1157 void                    g_file_eject_mountable_with_operation (GFile                  *file,
1158                                GMountUnmountFlags          flags,
1159                                GMountOperation            *mount_operation,
1160                                GCancellable               *cancellable,
1161                                GAsyncReadyCallback         callback,
1162                                gpointer                    user_data);
1163 GIO_AVAILABLE_IN_ALL
1164 gboolean                g_file_eject_mountable_with_operation_finish (GFile           *file,
1165                                GAsyncResult               *result,
1166                                GError                    **error);
1167 
1168 GIO_AVAILABLE_IN_2_68
1169 char *          g_file_build_attribute_list_for_copy (GFile                   *file,
1170                                GFileCopyFlags              flags,
1171                                GCancellable               *cancellable,
1172                                GError                    **error);
1173 
1174 GIO_AVAILABLE_IN_ALL
1175 gboolean                g_file_copy_attributes            (GFile                      *source,
1176                                GFile                      *destination,
1177                                GFileCopyFlags              flags,
1178                                GCancellable               *cancellable,
1179                                GError                    **error);
1180 
1181 
1182 GIO_AVAILABLE_IN_ALL
1183 GFileMonitor*           g_file_monitor_directory          (GFile                  *file,
1184                                GFileMonitorFlags       flags,
1185                                GCancellable           *cancellable,
1186                                GError                **error);
1187 GIO_AVAILABLE_IN_ALL
1188 GFileMonitor*           g_file_monitor_file               (GFile                  *file,
1189                                GFileMonitorFlags       flags,
1190                                GCancellable           *cancellable,
1191                                GError                **error);
1192 GIO_AVAILABLE_IN_ALL
1193 GFileMonitor*           g_file_monitor                    (GFile                  *file,
1194                                GFileMonitorFlags       flags,
1195                                GCancellable           *cancellable,
1196                                GError                **error);
1197 
1198 GIO_AVAILABLE_IN_2_38
1199 gboolean                g_file_measure_disk_usage         (GFile                         *file,
1200                                                            GFileMeasureFlags              flags,
1201                                                            GCancellable                  *cancellable,
1202                                                            GFileMeasureProgressCallback   progress_callback,
1203                                                            gpointer                       progress_data,
1204                                                            guint64                       *disk_usage,
1205                                                            guint64                       *num_dirs,
1206                                                            guint64                       *num_files,
1207                                                            GError                       **error);
1208 
1209 GIO_AVAILABLE_IN_2_38
1210 void                    g_file_measure_disk_usage_async   (GFile                         *file,
1211                                                            GFileMeasureFlags              flags,
1212                                                            gint                           io_priority,
1213                                                            GCancellable                  *cancellable,
1214                                                            GFileMeasureProgressCallback   progress_callback,
1215                                                            gpointer                       progress_data,
1216                                                            GAsyncReadyCallback            callback,
1217                                                            gpointer                       user_data);
1218 
1219 GIO_AVAILABLE_IN_2_38
1220 gboolean                g_file_measure_disk_usage_finish  (GFile                         *file,
1221                                                            GAsyncResult                  *result,
1222                                                            guint64                       *disk_usage,
1223                                                            guint64                       *num_dirs,
1224                                                            guint64                       *num_files,
1225                                                            GError                       **error);
1226 
1227 GIO_AVAILABLE_IN_ALL
1228 void                    g_file_start_mountable            (GFile                      *file,
1229                                GDriveStartFlags            flags,
1230                                GMountOperation            *start_operation,
1231                                GCancellable               *cancellable,
1232                                GAsyncReadyCallback         callback,
1233                                gpointer                    user_data);
1234 GIO_AVAILABLE_IN_ALL
1235 gboolean                g_file_start_mountable_finish     (GFile                      *file,
1236                                GAsyncResult               *result,
1237                                GError                    **error);
1238 GIO_AVAILABLE_IN_ALL
1239 void                    g_file_stop_mountable             (GFile                      *file,
1240                                GMountUnmountFlags          flags,
1241                                                            GMountOperation            *mount_operation,
1242                                GCancellable               *cancellable,
1243                                GAsyncReadyCallback         callback,
1244                                gpointer                    user_data);
1245 GIO_AVAILABLE_IN_ALL
1246 gboolean                g_file_stop_mountable_finish      (GFile                      *file,
1247                                GAsyncResult               *result,
1248                                GError                    **error);
1249 
1250 GIO_AVAILABLE_IN_ALL
1251 void                    g_file_poll_mountable             (GFile                      *file,
1252                                GCancellable               *cancellable,
1253                                GAsyncReadyCallback         callback,
1254                                gpointer                    user_data);
1255 GIO_AVAILABLE_IN_ALL
1256 gboolean                g_file_poll_mountable_finish      (GFile                      *file,
1257                                GAsyncResult               *result,
1258                                GError                    **error);
1259 
1260 /* Utilities */
1261 
1262 GIO_AVAILABLE_IN_ALL
1263 GAppInfo *g_file_query_default_handler       (GFile                  *file,
1264                           GCancellable           *cancellable,
1265                           GError                **error);
1266 GIO_AVAILABLE_IN_2_60
1267 void      g_file_query_default_handler_async (GFile                  *file,
1268                                               int                     io_priority,
1269                                               GCancellable           *cancellable,
1270                                               GAsyncReadyCallback     callback,
1271                                               gpointer                user_data);
1272 GIO_AVAILABLE_IN_2_60
1273 GAppInfo *g_file_query_default_handler_finish (GFile                 *file,
1274                                                GAsyncResult          *result,
1275                                                GError               **error);
1276 
1277 GIO_AVAILABLE_IN_ALL
1278 gboolean g_file_load_contents                (GFile                  *file,
1279                           GCancellable           *cancellable,
1280                           char                  **contents,
1281                           gsize                  *length,
1282                           char                  **etag_out,
1283                           GError                **error);
1284 GIO_AVAILABLE_IN_ALL
1285 void     g_file_load_contents_async          (GFile                  *file,
1286                           GCancellable           *cancellable,
1287                           GAsyncReadyCallback     callback,
1288                           gpointer                user_data);
1289 GIO_AVAILABLE_IN_ALL
1290 gboolean g_file_load_contents_finish         (GFile                  *file,
1291                           GAsyncResult           *res,
1292                           char                  **contents,
1293                           gsize                  *length,
1294                           char                  **etag_out,
1295                           GError                **error);
1296 GIO_AVAILABLE_IN_ALL
1297 void     g_file_load_partial_contents_async  (GFile                  *file,
1298                           GCancellable           *cancellable,
1299                           GFileReadMoreCallback   read_more_callback,
1300                           GAsyncReadyCallback     callback,
1301                           gpointer                user_data);
1302 GIO_AVAILABLE_IN_ALL
1303 gboolean g_file_load_partial_contents_finish (GFile                  *file,
1304                           GAsyncResult           *res,
1305                           char                  **contents,
1306                           gsize                  *length,
1307                           char                  **etag_out,
1308                           GError                **error);
1309 GIO_AVAILABLE_IN_ALL
1310 gboolean g_file_replace_contents             (GFile                  *file,
1311                           const char             *contents,
1312                           gsize                   length,
1313                           const char             *etag,
1314                           gboolean                make_backup,
1315                           GFileCreateFlags        flags,
1316                           char                  **new_etag,
1317                           GCancellable           *cancellable,
1318                           GError                **error);
1319 GIO_AVAILABLE_IN_ALL
1320 void     g_file_replace_contents_async       (GFile                  *file,
1321                           const char             *contents,
1322                           gsize                   length,
1323                           const char             *etag,
1324                           gboolean                make_backup,
1325                           GFileCreateFlags        flags,
1326                           GCancellable           *cancellable,
1327                           GAsyncReadyCallback     callback,
1328                           gpointer                user_data);
1329 GIO_AVAILABLE_IN_2_40
1330 void     g_file_replace_contents_bytes_async (GFile                  *file,
1331                           GBytes                 *contents,
1332                           const char             *etag,
1333                           gboolean                make_backup,
1334                           GFileCreateFlags        flags,
1335                           GCancellable           *cancellable,
1336                           GAsyncReadyCallback     callback,
1337                           gpointer                user_data);
1338 GIO_AVAILABLE_IN_ALL
1339 gboolean g_file_replace_contents_finish      (GFile                  *file,
1340                           GAsyncResult           *res,
1341                           char                  **new_etag,
1342                           GError                **error);
1343 
1344 GIO_AVAILABLE_IN_ALL
1345 gboolean g_file_supports_thread_contexts     (GFile                  *file);
1346 
1347 GIO_AVAILABLE_IN_2_56
1348 GBytes  *g_file_load_bytes                   (GFile                  *file,
1349                                               GCancellable           *cancellable,
1350                                               gchar                 **etag_out,
1351                                               GError                **error);
1352 GIO_AVAILABLE_IN_2_56
1353 void     g_file_load_bytes_async             (GFile                  *file,
1354                                               GCancellable           *cancellable,
1355                                               GAsyncReadyCallback     callback,
1356                                               gpointer                user_data);
1357 GIO_AVAILABLE_IN_2_56
1358 GBytes  *g_file_load_bytes_finish            (GFile                  *file,
1359                                               GAsyncResult           *result,
1360                                               gchar                 **etag_out,
1361                                               GError                **error);
1362 
1363 G_END_DECLS
1364 
1365 #endif /* __G_FILE_H__ */