diff --git a/lib/private/Files/Cache/QuerySearchHelper.php b/lib/private/Files/Cache/QuerySearchHelper.php index 30b3c7225ac00..a0914e7e8ed2f 100644 --- a/lib/private/Files/Cache/QuerySearchHelper.php +++ b/lib/private/Files/Cache/QuerySearchHelper.php @@ -35,6 +35,7 @@ use OCP\Files\Cache\ICacheEntry; use OCP\Files\Folder; use OCP\Files\IMimeTypeLoader; +use OCP\Files\IRootFolder; use OCP\Files\Mount\IMountPoint; use OCP\Files\Search\ISearchBinaryOperator; use OCP\Files\Search\ISearchQuery; @@ -198,7 +199,7 @@ public function searchInCaches(ISearchQuery $searchQuery, array $caches): array /** * @return array{array, array} */ - public function getCachesAndMountPointsForSearch(Root $root, string $path, bool $limitToHome = false): array { + public function getCachesAndMountPointsForSearch(IRootFolder $root, string $path, bool $limitToHome = false): array { $rootLength = strlen($path); $mount = $root->getMount($path); $storage = $mount->getStorage(); diff --git a/lib/public/Files/IRootFolder.php b/lib/public/Files/IRootFolder.php index 452c0fd31573b..91d14f3cad972 100644 --- a/lib/public/Files/IRootFolder.php +++ b/lib/public/Files/IRootFolder.php @@ -55,4 +55,40 @@ public function getUserFolder($userId); * @since 24.0.0 */ public function getByIdInPath(int $id, string $path); + + /** + * @param \OC\Files\Storage\Storage $storage + * @param string $mountPoint + * @param array $arguments + */ + public function mount($storage, $mountPoint, $arguments = []); + + /** + * @param string $mountPoint + * @return \OC\Files\Mount\MountPoint + */ + public function getMount($mountPoint); + + /** + * @param string $mountPoint + * @return \OC\Files\Mount\MountPoint[] + */ + public function getMountsIn($mountPoint); + + /** + * @param string $storageId + * @return \OC\Files\Mount\MountPoint[] + */ + public function getMountByStorageId($storageId); + + /** + * @param int $numericId + * @return MountPoint[] + */ + public function getMountByNumericStorageId($numericId); + + /** + * @param \OC\Files\Mount\MountPoint $mount + */ + public function unMount($mount); }