Files
Ferdinand Thiessen 1fa19d0661 fix(trash): address review feedback on trash deletion events
- Remove the reference to the non-existent BeforeAllNodeDeletedEvent
  and fix the descriptions of the trash bin deletion events.
- Add a test that Trashbin::delete returns the size of deleted files
  and folders, now that it relies on Node::getSize.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-11-18 22:22:44 +01:00

31 lines
559 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Files_Trashbin\Events;
use OCP\EventDispatcher\Event;
use OCP\Files\Node;
/**
* Event sent before a node is permanently deleted from the trash bin.
*
* @since 35.0.0
*/
class BeforeNodeDeletedEvent extends Event {
public function __construct(
private readonly Node $source,
) {
parent::__construct();
}
public function getSource(): Node {
return $this->source;
}
}