aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Files/Config
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Files/Config')
-rw-r--r--lib/public/Files/Config/IMountProviderCollection.php10
-rw-r--r--lib/public/Files/Config/IUserMountCache.php26
2 files changed, 35 insertions, 1 deletions
diff --git a/lib/public/Files/Config/IMountProviderCollection.php b/lib/public/Files/Config/IMountProviderCollection.php
index f845d72cee6..5894d06a388 100644
--- a/lib/public/Files/Config/IMountProviderCollection.php
+++ b/lib/public/Files/Config/IMountProviderCollection.php
@@ -39,6 +39,16 @@ interface IMountProviderCollection {
public function getMountsForUser(IUser $user);
/**
+ * Get the configured mount points for the user from a specific mount provider
+ *
+ * @param \OCP\IUser $user
+ * @param class-string<IMountProvider> $mountProviderClass
+ * @return \OCP\Files\Mount\IMountPoint[]
+ * @since 24.0.0
+ */
+ public function getUserMountsForProviderClass(IUser $user, string $mountProviderClass);
+
+ /**
* Get the configured home mount for this user
*
* @param \OCP\IUser $user
diff --git a/lib/public/Files/Config/IUserMountCache.php b/lib/public/Files/Config/IUserMountCache.php
index 08f95990d3c..4411200c7ae 100644
--- a/lib/public/Files/Config/IUserMountCache.php
+++ b/lib/public/Files/Config/IUserMountCache.php
@@ -25,6 +25,7 @@
namespace OCP\Files\Config;
use OCP\Files\Mount\IMountPoint;
+use OCP\Files\NotFoundException;
use OCP\IUser;
/**
@@ -38,9 +39,10 @@ interface IUserMountCache {
*
* @param IUser $user
* @param IMountPoint[] $mounts
+ * @param array|null $mountProviderClasses
* @since 9.0.0
*/
- public function registerMounts(IUser $user, array $mounts);
+ public function registerMounts(IUser $user, array $mounts, array $mountProviderClasses = null);
/**
* Get all cached mounts for a user
@@ -125,4 +127,26 @@ interface IUserMountCache {
* @since 20.0.0
*/
public function clear(): void;
+
+ /**
+ * Get all cached mounts for a user
+ *
+ * @param IUser $user
+ * @param string $path
+ * @return ICachedMountInfo
+ * @throws NotFoundException
+ * @since 24.0.0
+ */
+ public function getMountForPath(IUser $user, string $path): ICachedMountInfo;
+
+ /**
+ * Get all cached mounts for a user inside a path
+ *
+ * @param IUser $user
+ * @param string $path
+ * @return ICachedMountInfo[]
+ * @throws NotFoundException
+ * @since 24.0.0
+ */
+ public function getMountsInPath(IUser $user, string $path): array;
}