From dec880b285e47207eeebd36b1c512c1d85a18676 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 25 Oct 2023 18:04:34 +0200 Subject: optimize builtin storage wrappers Signed-off-by: Robin Appelman --- apps/files_sharing/lib/External/Mount.php | 3 ++- apps/files_sharing/lib/ISharedMountPoint.php | 28 ++++++++++++++++++++++++++++ apps/files_sharing/lib/SharedMount.php | 2 +- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 apps/files_sharing/lib/ISharedMountPoint.php (limited to 'apps/files_sharing/lib') diff --git a/apps/files_sharing/lib/External/Mount.php b/apps/files_sharing/lib/External/Mount.php index ccd31147f26..283027ac43a 100644 --- a/apps/files_sharing/lib/External/Mount.php +++ b/apps/files_sharing/lib/External/Mount.php @@ -26,8 +26,9 @@ namespace OCA\Files_Sharing\External; use OC\Files\Mount\MountPoint; use OC\Files\Mount\MoveableMount; +use OCA\Files_Sharing\ISharedMountPoint; -class Mount extends MountPoint implements MoveableMount { +class Mount extends MountPoint implements MoveableMount, ISharedMountPoint { /** * @var \OCA\Files_Sharing\External\Manager diff --git a/apps/files_sharing/lib/ISharedMountPoint.php b/apps/files_sharing/lib/ISharedMountPoint.php new file mode 100644 index 00000000000..f3947599c29 --- /dev/null +++ b/apps/files_sharing/lib/ISharedMountPoint.php @@ -0,0 +1,28 @@ + + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +namespace OCA\Files_Sharing; + +interface ISharedMountPoint { + +} diff --git a/apps/files_sharing/lib/SharedMount.php b/apps/files_sharing/lib/SharedMount.php index 6cde9f82bec..a9d5bf82935 100644 --- a/apps/files_sharing/lib/SharedMount.php +++ b/apps/files_sharing/lib/SharedMount.php @@ -44,7 +44,7 @@ use OCP\Share\Events\VerifyMountPointEvent; /** * Shared mount points can be moved by the user */ -class SharedMount extends MountPoint implements MoveableMount { +class SharedMount extends MountPoint implements MoveableMount, ISharedMountPoint { /** * @var \OCA\Files_Sharing\SharedStorage $storage */ -- cgit v1.2.3