summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib/Sabre/TrashFolderFile.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/lib/Sabre/TrashFolderFile.php')
-rw-r--r--apps/files_trashbin/lib/Sabre/TrashFolderFile.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/Sabre/TrashFolderFile.php b/apps/files_trashbin/lib/Sabre/TrashFolderFile.php
index 5a9133f3adb..b927d0a0870 100644
--- a/apps/files_trashbin/lib/Sabre/TrashFolderFile.php
+++ b/apps/files_trashbin/lib/Sabre/TrashFolderFile.php
@@ -26,7 +26,7 @@ use OCP\Files\FileInfo;
use Sabre\DAV\Exception\Forbidden;
use Sabre\DAV\IFile;
-class TrashFolderFile implements IFile {
+class TrashFolderFile implements IFile, ITrash {
/** @var string */
private $root;
@@ -78,4 +78,8 @@ class TrashFolderFile implements IFile {
return $this->data->getMtime();
}
+ public function restore(): bool {
+ return \OCA\Files_Trashbin\Trashbin::restore($this->root . '/' . $this->getName(), $this->data->getName(), null);
+ }
+
}