2020-04-09 11:50:14 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2019-09-25 18:07:32 +02:00
|
|
|
/**
|
2024-05-10 15:09:14 +02:00
|
|
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2019-09-25 18:07:32 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Test\Files\ObjectStore;
|
|
|
|
|
|
|
|
use OCP\Files\ObjectStore\IObjectStore;
|
|
|
|
|
|
|
|
class FailDeleteObjectStore implements IObjectStore {
|
|
|
|
private $objectStore;
|
|
|
|
|
|
|
|
public function __construct(IObjectStore $objectStore) {
|
|
|
|
$this->objectStore = $objectStore;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getStorageId() {
|
|
|
|
return $this->objectStore->getStorageId();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function readObject($urn) {
|
|
|
|
return $this->objectStore->readObject($urn);
|
|
|
|
}
|
|
|
|
|
2024-03-28 16:13:19 +01:00
|
|
|
public function writeObject($urn, $stream, ?string $mimetype = null) {
|
2021-04-15 17:14:57 +02:00
|
|
|
return $this->objectStore->writeObject($urn, $stream, $mimetype);
|
2019-09-25 18:07:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function deleteObject($urn) {
|
|
|
|
throw new \Exception();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function objectExists($urn) {
|
|
|
|
return $this->objectStore->objectExists($urn);
|
|
|
|
}
|
2020-11-05 16:30:05 +01:00
|
|
|
|
|
|
|
public function copyObject($from, $to) {
|
|
|
|
$this->objectStore->copyObject($from, $to);
|
|
|
|
}
|
2019-09-25 18:07:32 +02:00
|
|
|
}
|