aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib/Sabre/TrashFile.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/lib/Sabre/TrashFile.php')
-rw-r--r--apps/files_trashbin/lib/Sabre/TrashFile.php6
1 files changed, 5 insertions, 1 deletions
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());
+ }
+
}