aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Files/ObjectStore/IObjectStore.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2022-09-01 17:28:18 +0200
committerJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-01-18 12:34:30 +0100
commitdd510dfe70782fba38d068e9180fe95cf9bf5a5a (patch)
tree0949769a9b5a111373a03022984ad07c1f415966 /lib/public/Files/ObjectStore/IObjectStore.php
parent1334055ab8d07f2a02806dc68235413b72903218 (diff)
downloadnextcloud-server-instance-quota.tar.gz
nextcloud-server-instance-quota.zip
Allow to mesure free space in object storages, based on used size and quotainstance-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 <tcit@tcit.fr>
Diffstat (limited to 'lib/public/Files/ObjectStore/IObjectStore.php')
-rw-r--r--lib/public/Files/ObjectStore/IObjectStore.php14
1 files changed, 14 insertions, 0 deletions
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;
}