diff options
Diffstat (limited to 'lib/private/Files/ObjectStore/Swift.php')
-rw-r--r-- | lib/private/Files/ObjectStore/Swift.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/Files/ObjectStore/Swift.php b/lib/private/Files/ObjectStore/Swift.php index b463cb9d44d..5a8860a6d51 100644 --- a/lib/private/Files/ObjectStore/Swift.php +++ b/lib/private/Files/ObjectStore/Swift.php @@ -29,6 +29,7 @@ use GuzzleHttp\Client; use GuzzleHttp\Exception\BadResponseException; use GuzzleHttp\Psr7\Utils; use Icewind\Streams\RetryWrapper; +use OCP\Files\FileInfo; use OCP\Files\NotFoundException; use OCP\Files\ObjectStore\IObjectStore; use OCP\Files\StorageAuthException; @@ -152,4 +153,12 @@ class Swift implements IObjectStore { 'destination' => $this->getContainer()->name . '/' . $to ]); } + + public function bytesUsed(): int { + return $this->getContainer()->bytesUsed; + } + + public function bytesQuota(): int { + return $this->getContainer()->getMetadata()['Quota-Bytes'] ?? FileInfo::SPACE_UNLIMITED; + } } |