2018-04-16 08:14:31 -04:00
|
|
|
<?php
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2018-04-25 14:24:23 -04:00
|
|
|
declare(strict_types=1);
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2018-04-16 08:14:31 -04:00
|
|
|
/**
|
2024-06-02 09:26:54 -04:00
|
|
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2018-04-16 08:14:31 -04:00
|
|
|
*/
|
2018-09-10 08:40:35 -04:00
|
|
|
namespace OCA\Files_Trashbin\Sabre;
|
2018-04-16 08:14:31 -04:00
|
|
|
|
2023-05-31 22:06:42 -04:00
|
|
|
use OCA\Files_Trashbin\Trashbin;
|
|
|
|
|
|
2018-09-10 08:40:35 -04:00
|
|
|
class TrashFile extends AbstractTrashFile {
|
2018-04-16 08:14:31 -04:00
|
|
|
public function get() {
|
2024-01-03 08:41:58 -05:00
|
|
|
return $this->data->getStorage()->fopen(Trashbin::getTrashFilename($this->data->getInternalPath(), $this->getDeletionTime()), 'rb');
|
2018-04-16 08:14:31 -04:00
|
|
|
}
|
|
|
|
|
|
2018-04-25 14:24:23 -04:00
|
|
|
public function getName(): string {
|
2024-01-03 08:41:58 -05:00
|
|
|
return Trashbin::getTrashFilename($this->data->getName(), $this->getDeletionTime());
|
2018-04-16 08:14:31 -04:00
|
|
|
}
|
|
|
|
|
}
|