1
0

ITrashItem.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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\Files\FileInfo;
  8. use OCP\IUser;
  9. /**
  10. * @since 15.0.0
  11. */
  12. interface ITrashItem extends FileInfo {
  13. /**
  14. * Get the trash backend for this item
  15. *
  16. * @return ITrashBackend
  17. * @since 15.0.0
  18. */
  19. public function getTrashBackend(): ITrashBackend;
  20. /**
  21. * Get the original location for the trash item
  22. *
  23. * @return string
  24. * @since 15.0.0
  25. */
  26. public function getOriginalLocation(): string;
  27. /**
  28. * Get the timestamp that the file was moved to trash
  29. *
  30. * @return int
  31. * @since 15.0.0
  32. */
  33. public function getDeletedTime(): int;
  34. /**
  35. * Get the path of the item relative to the users trashbin
  36. *
  37. * @return string
  38. * @since 15.0.0
  39. */
  40. public function getTrashPath(): string;
  41. /**
  42. * Whether the item is a deleted item in the root of the trash, or a file in a subfolder
  43. *
  44. * @return bool
  45. * @since 15.0.0
  46. */
  47. public function isRootItem(): bool;
  48. /**
  49. * Get the user for which this trash item applies
  50. *
  51. * @return IUser
  52. * @since 15.0.0
  53. */
  54. public function getUser(): IUser;
  55. /**
  56. * @since 30.0.0
  57. */
  58. public function getDeletedBy(): ?IUser;
  59. public function getTitle(): string;
  60. }