ITrashManager.php 818 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCA\Files_Trashbin\Trash;
  7. use OCP\IUser;
  8. interface ITrashManager extends ITrashBackend {
  9. /**
  10. * Add a backend for the trashbin
  11. *
  12. * @param string $storageType
  13. * @param ITrashBackend $backend
  14. * @since 15.0.0
  15. */
  16. public function registerBackend(string $storageType, ITrashBackend $backend);
  17. /**
  18. * List all trash items in the root of the trashbin
  19. *
  20. * @param IUser $user
  21. * @return ITrashItem[]
  22. * @since 15.0.0
  23. */
  24. public function listTrashRoot(IUser $user): array;
  25. /**
  26. * Temporally prevent files from being moved to the trash
  27. *
  28. * @since 15.0.0
  29. */
  30. public function pauseTrash();
  31. /**
  32. * @since 15.0.0
  33. */
  34. public function resumeTrash();
  35. }