RenameChange.php 721 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OC\Files\Notify;
  7. use OCP\Files\Notify\IRenameChange;
  8. class RenameChange extends Change implements IRenameChange {
  9. /** @var string */
  10. private $targetPath;
  11. /**
  12. * Change constructor.
  13. *
  14. * @param int $type
  15. * @param string $path
  16. * @param string $targetPath
  17. */
  18. public function __construct($type, $path, $targetPath) {
  19. parent::__construct($type, $path);
  20. $this->targetPath = $targetPath;
  21. }
  22. /**
  23. * Get the new path of the renamed file relative to the storage root
  24. *
  25. * @return string
  26. */
  27. public function getTargetPath() {
  28. return $this->targetPath;
  29. }
  30. }