* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
*/
* @g_iface: The parent interface.
* @dup: Duplicates a #GFile.
* @hash: Creates a hash of a #GFile.
- * @equal: Checks equality of two given #GFile<!-- -->s.
+ * @equal: Checks equality of two given #GFiles.
* @is_native: Checks to see if a file is native to the system.
* @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
* @get_uri_scheme: Gets the URI scheme for a #GFile.
* @set_display_name: Sets the display name for a #GFile.
* @set_display_name_async: Asynchronously sets a #GFile's display name.
* @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
- * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
- * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
+ * @query_settable_attributes: Returns a list of #GFileAttributes that can be set.
+ * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttributes that can be set.
* @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
* @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
* @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
* @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
* @poll_mountable: Polls a mountable object for media changes. Since 2.22.
* @poll_mountable_finish: Finishes an poll operation for media changes. Since 2.22.
+ * @measure_disk_usage: Recursively measures the disk usage of @file. Since 2.38
+ * @measure_disk_usage_async: Asynchronously recursively measures the disk usage of @file. Since 2.38
+ * @measure_disk_usage_finish: Finishes an asynchronous recursive measurement of the disk usage of @file. Since 2.38
*
* An interface for writing VFS file handles.
**/
gboolean (* poll_mountable_finish) (GFile *file,
GAsyncResult *result,
GError **error);
+
+ gboolean (* measure_disk_usage) (GFile *file,
+ GFileMeasureFlags flags,
+ GCancellable *cancellable,
+ GFileMeasureProgressCallback progress_callback,
+ gpointer progress_data,
+ guint64 *disk_usage,
+ guint64 *num_dirs,
+ guint64 *num_files,
+ GError **error);
+ void (* measure_disk_usage_async) (GFile *file,
+ GFileMeasureFlags flags,
+ gint io_priority,
+ GCancellable *cancellable,
+ GFileMeasureProgressCallback progress_callback,
+ gpointer progress_data,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (* measure_disk_usage_finish) (GFile *file,
+ GAsyncResult *result,
+ guint64 *disk_usage,
+ guint64 *num_dirs,
+ guint64 *num_files,
+ GError **error);
};
GLIB_AVAILABLE_IN_ALL
GCancellable *cancellable,
GError **error);
+GLIB_AVAILABLE_IN_2_38
+gboolean g_file_measure_disk_usage (GFile *file,
+ GFileMeasureFlags flags,
+ GCancellable *cancellable,
+ GFileMeasureProgressCallback progress_callback,
+ gpointer progress_data,
+ guint64 *disk_usage,
+ guint64 *num_dirs,
+ guint64 *num_files,
+ GError **error);
+
+GLIB_AVAILABLE_IN_2_38
+void g_file_measure_disk_usage_async (GFile *file,
+ GFileMeasureFlags flags,
+ gint io_priority,
+ GCancellable *cancellable,
+ GFileMeasureProgressCallback progress_callback,
+ gpointer progress_data,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+GLIB_AVAILABLE_IN_2_38
+gboolean g_file_measure_disk_usage_finish (GFile *file,
+ GAsyncResult *result,
+ guint64 *disk_usage,
+ guint64 *num_dirs,
+ guint64 *num_files,
+ GError **error);
+
GLIB_AVAILABLE_IN_ALL
void g_file_start_mountable (GFile *file,
GDriveStartFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
+GLIB_AVAILABLE_IN_2_40
+void g_file_replace_contents_bytes_async (GFile *file,
+ GBytes *contents,
+ const char *etag,
+ gboolean make_backup,
+ GFileCreateFlags flags,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
GLIB_AVAILABLE_IN_ALL
gboolean g_file_replace_contents_finish (GFile *file,
GAsyncResult *res,