summaryrefslogtreecommitdiff
path: root/gio/gfile.h
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2013-07-28 13:41:17 -0400
committerRyan Lortie <desrt@desrt.ca>2013-09-06 13:16:17 -0400
commit6ec2bb17c393c411a2182e865aa0979165dfbac5 (patch)
tree4857e1d5d2275ae07eacebb4ad24d1553e9a1eef /gio/gfile.h
parent242a735fe02462f7e6e8b2b2dc8c55d380d4fd96 (diff)
downloadglib-6ec2bb17c393c411a2182e865aa0979165dfbac5.tar.gz
GFile: add new g_file_measure_disk_usage() API
This is essentially the equivalent of 'du'. This is currently only supported on local files. gvfs will add support for the interface later. https://bugzilla.gnome.org/show_bug.cgi?id=704893
Diffstat (limited to 'gio/gfile.h')
-rw-r--r--gio/gfile.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/gio/gfile.h b/gio/gfile.h
index 0cf6ee28f..394c643fb 100644
--- a/gio/gfile.h
+++ b/gio/gfile.h
@@ -561,6 +561,30 @@ struct _GFileIface
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
@@ -1085,6 +1109,35 @@ GFileMonitor* g_file_monitor (GFile
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,