From dd510dfe70782fba38d068e9180fe95cf9bf5a5a Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 1 Sep 2022 17:28:18 +0200 Subject: Allow to mesure free space in object storages, based on used size and quota If the object storage backend doesn't return quota or used bytes information, use a config override for the quota and count the size used in Nextcloud instead. Signed-off-by: Thomas Citharel --- lib/public/Files/ObjectStore/IObjectStore.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/public/Files/ObjectStore/IObjectStore.php') diff --git a/lib/public/Files/ObjectStore/IObjectStore.php b/lib/public/Files/ObjectStore/IObjectStore.php index a202ef7c0c2..c51cdf1426a 100644 --- a/lib/public/Files/ObjectStore/IObjectStore.php +++ b/lib/public/Files/ObjectStore/IObjectStore.php @@ -80,4 +80,18 @@ interface IObjectStore { * @since 21.0.0 */ public function copyObject($from, $to); + + /** + * Returns the number of bytes used in the object store + * + * @since 26.0.0 + */ + public function bytesUsed(): int; + + /** + * Returns the eventual quota of the object store, in bytes + * + * @since 26.0.0 + */ + public function bytesQuota(): int; } -- cgit v1.2.3