-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(MountManager): Emit events when mounts are added, removed and moved
Signed-off-by: provokateurin <[email protected]>
- Loading branch information
1 parent
9c717aa
commit e3b1f01
Showing
7 changed files
with
172 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OCP\Files\Mount\Event; | ||
|
||
use OCP\EventDispatcher\Event; | ||
use OCP\Files\Mount\IMountPoint; | ||
|
||
/** | ||
* Event emitted when a mount was added. | ||
* | ||
* @since 31.0.0 | ||
*/ | ||
class MountAddedEvent extends Event { | ||
public function __construct( | ||
public readonly IMountPoint $mountPoint, | ||
) { | ||
parent::__construct(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OCP\Files\Mount\Event; | ||
|
||
use OCP\EventDispatcher\Event; | ||
use OCP\Files\Mount\IMountPoint; | ||
|
||
/** | ||
* Event emitted when a mount was moved. | ||
* | ||
* @since 31.0.0 | ||
*/ | ||
class MountMovedEvent extends Event { | ||
public function __construct( | ||
public readonly IMountPoint $mountPoint, | ||
public readonly string $oldPath, | ||
public readonly string $newPath, | ||
) { | ||
parent::__construct(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OCP\Files\Mount\Event; | ||
|
||
use OCP\EventDispatcher\Event; | ||
use OCP\Files\Mount\IMountPoint; | ||
|
||
/** | ||
* Event emitted when a mount was removed. | ||
* | ||
* @since 31.0.0 | ||
*/ | ||
class MountRemovedEvent extends Event { | ||
public function __construct( | ||
public readonly IMountPoint $mountPoint, | ||
) { | ||
parent::__construct(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters