diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 8ce8c843a6628..ab0d5da1ead37 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -557,6 +557,26 @@ public function delete() { } } + /** + * Return symlink target of the file + * + * @return string|null + * @throws NotFound + * @throws Forbidden + * @throws FileLocked + */ + public function readlink() { + if (!$this->info->isReadable()) { + throw new NotFound(); + } + + try { + return $this->fileView->readlink($this->path); + } catch (\Exception $e) { + $this->convertToSabreException($e); + } + } + /** * Returns the mime-type for a file *