TrashFile.php 569 B

123456789101112131415161718192021
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\Files_Trashbin\Sabre;
  8. use OCA\Files_Trashbin\Trashbin;
  9. class TrashFile extends AbstractTrashFile {
  10. public function get() {
  11. return $this->data->getStorage()->fopen(Trashbin::getTrashFilename($this->data->getInternalPath(), $this->getDeletionTime()), 'rb');
  12. }
  13. public function getName(): string {
  14. return Trashbin::getTrashFilename($this->data->getName(), $this->getDeletionTime());
  15. }
  16. }