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
2 changes: 1 addition & 1 deletion lib/composer/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,11 @@
'OCP\\Files\\Config\\ICachedMountInfo' => $baseDir . '/lib/public/Files/Config/ICachedMountInfo.php',
'OCP\\Files\\Config\\IHomeMountProvider' => $baseDir . '/lib/public/Files/Config/IHomeMountProvider.php',
'OCP\\Files\\Config\\IMountProvider' => $baseDir . '/lib/public/Files/Config/IMountProvider.php',
'OCP\\Files\\Config\\IMountProviderArgs' => $baseDir . '/lib/public/Files/Config/IMountProviderArgs.php',
'OCP\\Files\\Config\\IMountProviderCollection' => $baseDir . '/lib/public/Files/Config/IMountProviderCollection.php',
'OCP\\Files\\Config\\IPartialMountProvider' => $baseDir . '/lib/public/Files/Config/IPartialMountProvider.php',
'OCP\\Files\\Config\\IRootMountProvider' => $baseDir . '/lib/public/Files/Config/IRootMountProvider.php',
'OCP\\Files\\Config\\IUserMountCache' => $baseDir . '/lib/public/Files/Config/IUserMountCache.php',
'OCP\\Files\\Config\\MountProviderArgs' => $baseDir . '/lib/public/Files/Config/MountProviderArgs.php',
'OCP\\Files\\ConnectionLostException' => $baseDir . '/lib/public/Files/ConnectionLostException.php',
'OCP\\Files\\Conversion\\ConversionMimeProvider' => $baseDir . '/lib/public/Files/Conversion/ConversionMimeProvider.php',
'OCP\\Files\\Conversion\\IConversionManager' => $baseDir . '/lib/public/Files/Conversion/IConversionManager.php',
Expand Down
2 changes: 1 addition & 1 deletion lib/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,11 +464,11 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OCP\\Files\\Config\\ICachedMountInfo' => __DIR__ . '/../../..' . '/lib/public/Files/Config/ICachedMountInfo.php',
'OCP\\Files\\Config\\IHomeMountProvider' => __DIR__ . '/../../..' . '/lib/public/Files/Config/IHomeMountProvider.php',
'OCP\\Files\\Config\\IMountProvider' => __DIR__ . '/../../..' . '/lib/public/Files/Config/IMountProvider.php',
'OCP\\Files\\Config\\IMountProviderArgs' => __DIR__ . '/../../..' . '/lib/public/Files/Config/IMountProviderArgs.php',
'OCP\\Files\\Config\\IMountProviderCollection' => __DIR__ . '/../../..' . '/lib/public/Files/Config/IMountProviderCollection.php',
'OCP\\Files\\Config\\IPartialMountProvider' => __DIR__ . '/../../..' . '/lib/public/Files/Config/IPartialMountProvider.php',
'OCP\\Files\\Config\\IRootMountProvider' => __DIR__ . '/../../..' . '/lib/public/Files/Config/IRootMountProvider.php',
'OCP\\Files\\Config\\IUserMountCache' => __DIR__ . '/../../..' . '/lib/public/Files/Config/IUserMountCache.php',
'OCP\\Files\\Config\\MountProviderArgs' => __DIR__ . '/../../..' . '/lib/public/Files/Config/MountProviderArgs.php',
'OCP\\Files\\ConnectionLostException' => __DIR__ . '/../../..' . '/lib/public/Files/ConnectionLostException.php',
'OCP\\Files\\Conversion\\ConversionMimeProvider' => __DIR__ . '/../../..' . '/lib/public/Files/Conversion/ConversionMimeProvider.php',
'OCP\\Files\\Conversion\\IConversionManager' => __DIR__ . '/../../..' . '/lib/public/Files/Conversion/IConversionManager.php',
Expand Down
4 changes: 2 additions & 2 deletions lib/private/Files/Config/MountProviderCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
use OCP\Diagnostics\IEventLogger;
use OCP\Files\Config\IHomeMountProvider;
use OCP\Files\Config\IMountProvider;
use OCP\Files\Config\IMountProviderArgs;
use OCP\Files\Config\IMountProviderCollection;
use OCP\Files\Config\IPartialMountProvider;
use OCP\Files\Config\IRootMountProvider;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\Config\MountProviderArgs;
use OCP\Files\Mount\IMountManager;
use OCP\Files\Mount\IMountPoint;
use OCP\Files\Storage\IStorageFactory;
Expand Down Expand Up @@ -84,7 +84,7 @@ public function getMountsForUser(IUser $user): array {
}

/**
* @param IMountProviderArgs[] $mountProviderArgs
* @param MountProviderArgs[] $mountProviderArgs
* @return array<string, IMountPoint> IMountPoint array indexed by mount
* point.
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/private/Files/SetupManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
use OCP\Files\Config\ICachedMountInfo;
use OCP\Files\Config\IHomeMountProvider;
use OCP\Files\Config\IMountProvider;
use OCP\Files\Config\IMountProviderArgs;
use OCP\Files\Config\IPartialMountProvider;
use OCP\Files\Config\IRootMountProvider;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\Config\MountProviderArgs;
use OCP\Files\Events\BeforeFileSystemSetupEvent;
use OCP\Files\Events\InvalidateMountCacheEvent;
use OCP\Files\Events\Node\BeforeNodeRenamedEvent;
Expand Down Expand Up @@ -482,7 +482,7 @@ public function setupForPath(string $path, bool $includeChildren = false): void
if (is_a($mountProvider, IPartialMountProvider::class, true)) {
$rootId = $cachedMount->getRootId();
$rootMetadata = $this->fileAccess->getByFileId($rootId);
$providerArgs = new IMountProviderArgs($cachedMount, $rootMetadata);
$providerArgs = new MountProviderArgs($cachedMount, $rootMetadata);
// mark the path as cached (without children for now...)
$this->setupMountProviderPaths[$mountPoint] = self::SETUP_WITHOUT_CHILDREN;
$authoritativeMounts[] = array_values(
Expand Down Expand Up @@ -568,7 +568,7 @@ static function (ICachedMountInfo $info) use ($rootsMetadata) {
$rootMetadata = $rootsMetadata[$info->getRootId()] ?? null;

return $rootMetadata
? new IMountProviderArgs($info, $rootMetadata)
? new MountProviderArgs($info, $rootMetadata)
: null;
},
$cachedMounts
Expand Down
4 changes: 2 additions & 2 deletions lib/public/Files/Config/IPartialMountProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ interface IPartialMountProvider extends IMountProvider {
* as well as information about mount points known to be provided by the
* mount provider and contained in the path or in its sub-paths.
*
* Implementations should verify the IMountProviderArgs and return the
* Implementations should verify the MountProviderArgs and return the
* corresponding IMountPoint instances.
*
* @param string $path path for which the mounts are set up
* @param bool $forChildren when true, only child mounts for path should be returned
* @param IMountProviderArgs[] $mountProviderArgs
* @param MountProviderArgs[] $mountProviderArgs
* @param IStorageFactory $loader
* @return array<string, IMountPoint> IMountPoint instances, indexed by
* mount-point
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*
* @since 33.0.0
*/
class IMountProviderArgs {
class MountProviderArgs {
public function __construct(
public ICachedMountInfo $mountInfo,
public ICacheEntry $cacheEntry,
public readonly ICachedMountInfo $mountInfo,
public readonly ICacheEntry $cacheEntry,
) {
}
}
12 changes: 6 additions & 6 deletions tests/lib/Files/SetupManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Config\ICachedMountInfo;
use OCP\Files\Config\IMountProvider;
use OCP\Files\Config\IMountProviderArgs;
use OCP\Files\Config\IPartialMountProvider;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\Config\MountProviderArgs;
use OCP\Files\Mount\IMountManager;
use OCP\Files\Mount\IMountPoint;
use OCP\Files\Storage\IStorageFactory;
Expand Down Expand Up @@ -147,7 +147,7 @@ public function testSetupForPathWithPartialProviderSkipsAlreadySetupPath(): void
false,
$this->callback(function (array $args) use ($cachedMount) {
$this->assertCount(1, $args);
$this->assertInstanceOf(IMountProviderArgs::class, $args[0]);
$this->assertInstanceOf(MountProviderArgs::class, $args[0]);
$this->assertSame($cachedMount, $args[0]->mountInfo);
return true;
})
Expand Down Expand Up @@ -366,7 +366,7 @@ public function testSetupForPathWithChildrenAndPartialProviderSkipsIfParentAlrea
$this->assertSame($expectedPath, $pathArg);
$this->assertSame($expectedForChildren, $forChildren);
$this->assertCount(1, $mountProviderArgs);
$this->assertInstanceOf(IMountProviderArgs::class, $mountProviderArgs[0]);
$this->assertInstanceOf(MountProviderArgs::class, $mountProviderArgs[0]);
$this->assertSame($expectedCachedMount, $mountProviderArgs[0]->mountInfo);

return $mountPoints;
Expand Down Expand Up @@ -468,7 +468,7 @@ public function testSetupForPathHandlesPartialAndFullProvidersWithChildren(): vo
$this->assertSame($expectedPath, $pathArg);
$this->assertSame($expectedForChildren, $forChildren);
$this->assertCount(1, $mountProviderArgs);
$this->assertInstanceOf(IMountProviderArgs::class, $mountProviderArgs[0]);
$this->assertInstanceOf(MountProviderArgs::class, $mountProviderArgs[0]);
$this->assertSame($expectedCachedMount, $mountProviderArgs[0]->mountInfo);

return $mountPoints;
Expand Down Expand Up @@ -520,7 +520,7 @@ public function testSetupForUserResetsUserPaths(): void {
false,
$this->callback(function (array $args) use ($cachedMount) {
$this->assertCount(1, $args);
$this->assertInstanceOf(IMountProviderArgs::class,
$this->assertInstanceOf(MountProviderArgs::class,
$args[0]);
$this->assertSame($cachedMount, $args[0]->mountInfo);
return true;
Expand Down Expand Up @@ -589,7 +589,7 @@ public function testSetupForProviderResetsUserProviderPaths(): void {
false,
$this->callback(function (array $args) use ($cachedMount) {
$this->assertCount(1, $args);
$this->assertInstanceOf(IMountProviderArgs::class,
$this->assertInstanceOf(MountProviderArgs::class,
$args[0]);
$this->assertSame($cachedMount, $args[0]->mountInfo);
return true;
Expand Down
Loading