From cb617c4949f9b8570f65bf972c29d4cd78bc9b6e Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 16 Apr 2018 17:02:50 +0200 Subject: Add special restore folder Signed-off-by: Roeland Jago Douma --- apps/files_trashbin/lib/Sabre/TrashFile.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/files_trashbin/lib/Sabre/TrashFile.php') diff --git a/apps/files_trashbin/lib/Sabre/TrashFile.php b/apps/files_trashbin/lib/Sabre/TrashFile.php index 39b788a2e2c..3e801a27579 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFile.php +++ b/apps/files_trashbin/lib/Sabre/TrashFile.php @@ -26,7 +26,7 @@ use OCP\Files\FileInfo; use Sabre\DAV\Exception\Forbidden; use Sabre\DAV\IFile; -class TrashFile implements IFile { +class TrashFile implements IFile, ITrash { /** @var string */ private $userId; @@ -74,4 +74,8 @@ class TrashFile implements IFile { return $this->data->getMtime(); } + public function restore(): bool { + return \OCA\Files_Trashbin\Trashbin::restore($this->getName(), $this->data->getName(), $this->getLastModified()); + } + } -- cgit v1.2.3