diff options
Diffstat (limited to 'apps/files_trashbin/lib/Sabre/TrashFolderFile.php')
-rw-r--r-- | apps/files_trashbin/lib/Sabre/TrashFolderFile.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/Sabre/TrashFolderFile.php b/apps/files_trashbin/lib/Sabre/TrashFolderFile.php index b927d0a0870..a9b8e838e0a 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFolderFile.php +++ b/apps/files_trashbin/lib/Sabre/TrashFolderFile.php @@ -36,10 +36,17 @@ class TrashFolderFile implements IFile, ITrash { /** @var FileInfo */ private $data; - public function __construct(string $root, string $userId, FileInfo $data) { + /** @var string */ + private $location; + + public function __construct(string $root, + string $userId, + FileInfo $data, + string $location) { $this->root = $root; $this->userId = $userId; $this->data = $data; + $this->location = $location; } public function put($data) { @@ -82,4 +89,13 @@ class TrashFolderFile implements IFile, ITrash { return \OCA\Files_Trashbin\Trashbin::restore($this->root . '/' . $this->getName(), $this->data->getName(), null); } + public function getFilename(): string { + return $this->data->getName(); + } + + public function getOriginalLocation(): string { + return $this->location . '/' . $this->getFilename(); + } + + } |