Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/private/Files/Config/MountProviderCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@ public function registerRootProvider(IRootMountProvider $provider) {
$this->rootProviders[] = $provider;
}

/**
* Get all root mountpoints
*
* @return \OCP\Files\Mount\IMountPoint[]
* @since 20.0.0
*/
public function getRootMounts(): array {
$loader = $this->loader;
$mounts = array_map(function (IRootMountProvider $provider) use ($loader) {
Expand Down
1 change: 0 additions & 1 deletion lib/private/legacy/OC_Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ public static function setupFS($user = '') {

/** @var \OCP\Files\Config\IMountProviderCollection $mountProviderCollection */
$mountProviderCollection = \OC::$server->query(\OCP\Files\Config\IMountProviderCollection::class);
/** @var \OCP\Files\Mount\IMountPoint[] $rootMountProviders */
$rootMountProviders = $mountProviderCollection->getRootMounts();

/** @var \OC\Files\Mount\Manager $mountManager */
Expand Down
8 changes: 8 additions & 0 deletions lib/public/Files/Config/IMountProviderCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,12 @@ public function registerHomeProvider(IHomeMountProvider $provider);
* @since 9.0.0
*/
public function getMountCache();

/**
* Get all root mountpoints
*
* @return \OCP\Files\Mount\IMountPoint[]
* @since 20.0.0
*/
public function getRootMounts(): array;
}
2 changes: 1 addition & 1 deletion lib/public/Files/Config/IRootMountProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*/
interface IRootMountProvider {
/**
* Get all root mountpoints
* Get all root mountpoints of this provider
*
* @return \OCP\Files\Mount\IMountPoint[]
* @since 20.0.0
Expand Down