IVersionsImporterBackend.php 735 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\Files_Versions\Versions;
  8. use OCP\Files\Node;
  9. use OCP\IUser;
  10. /**
  11. * @since 29.0.0
  12. */
  13. interface IVersionsImporterBackend {
  14. /**
  15. * Import the given versions for the target file.
  16. *
  17. * @param Node $source - The source might not exist anymore.
  18. * @param IVersion[] $versions
  19. * @since 29.0.0
  20. */
  21. public function importVersionsForFile(IUser $user, Node $source, Node $target, array $versions): void;
  22. /**
  23. * Clear all versions for a file
  24. *
  25. * @since 29.0.0
  26. */
  27. public function clearVersionsForFile(IUser $user, Node $source, Node $target): void;
  28. }