aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Files/Mount/IMountManager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Files/Mount/IMountManager.php')
-rw-r--r--lib/public/Files/Mount/IMountManager.php52
1 files changed, 22 insertions, 30 deletions
diff --git a/lib/public/Files/Mount/IMountManager.php b/lib/public/Files/Mount/IMountManager.php
index e01e3df88a4..43a771c07ce 100644
--- a/lib/public/Files/Mount/IMountManager.php
+++ b/lib/public/Files/Mount/IMountManager.php
@@ -1,32 +1,15 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <robin@icewind.nl>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-
namespace OCP\Files\Mount;
+use OCP\Files\Config\ICachedMountInfo;
+
/**
* Interface IMountManager
*
@@ -34,11 +17,10 @@ namespace OCP\Files\Mount;
* @since 8.2.0
*/
interface IMountManager {
-
/**
* Add a new mount
*
- * @param \OCP\Files\Mount\IMountPoint $mount
+ * @param IMountPoint $mount
* @since 8.2.0
*/
public function addMount(IMountPoint $mount);
@@ -64,16 +46,16 @@ interface IMountManager {
* Find the mount for $path
*
* @param string $path
- * @return \OCP\Files\Mount\IMountPoint|null
+ * @return IMountPoint
* @since 8.2.0
*/
- public function find(string $path);
+ public function find(string $path): ?IMountPoint;
/**
* Find all mounts in $path
*
* @param string $path
- * @return \OCP\Files\Mount\IMountPoint[]
+ * @return IMountPoint[]
* @since 8.2.0
*/
public function findIn(string $path): array;
@@ -89,13 +71,13 @@ interface IMountManager {
* Find mounts by storage id
*
* @param string $id
- * @return \OCP\Files\Mount\IMountPoint[]
+ * @return IMountPoint[]
* @since 8.2.0
*/
public function findByStorageId(string $id): array;
/**
- * @return \OCP\Files\Mount\IMountPoint[]
+ * @return IMountPoint[]
* @since 8.2.0
*/
public function getAll(): array;
@@ -104,8 +86,18 @@ interface IMountManager {
* Find mounts by numeric storage id
*
* @param int $id
- * @return \OCP\Files\Mount\IMountPoint[]
+ * @return IMountPoint[]
* @since 8.2.0
*/
public function findByNumericId(int $id): array;
+
+ /**
+ * Return the mount matching a cached mount info (or mount file info)
+ *
+ * @param ICachedMountInfo $info
+ *
+ * @return IMountPoint|null
+ * @since 28.0.0
+ */
+ public function getMountFromMountInfo(ICachedMountInfo $info): ?IMountPoint;
}