IChange.php 903 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCP\Files\Notify;
  7. /**
  8. * Represents a detected change in the storage
  9. *
  10. * @since 12.0.0
  11. */
  12. interface IChange {
  13. /**
  14. * @since 12.0.0
  15. */
  16. public const ADDED = 1;
  17. /**
  18. * @since 12.0.0
  19. */
  20. public const REMOVED = 2;
  21. /**
  22. * @since 12.0.0
  23. */
  24. public const MODIFIED = 3;
  25. /**
  26. * @since 12.0.0
  27. */
  28. public const RENAMED = 4;
  29. /**
  30. * Get the type of the change
  31. *
  32. * @return int IChange::ADDED, IChange::REMOVED, IChange::MODIFIED or IChange::RENAMED
  33. *
  34. * @since 12.0.0
  35. */
  36. public function getType();
  37. /**
  38. * Get the path of the file that was changed relative to the root of the storage
  39. *
  40. * Note, for rename changes this path is the old path for the file
  41. *
  42. * @return mixed
  43. *
  44. * @since 12.0.0
  45. */
  46. public function getPath();
  47. }