Skip to content

Commit

Permalink
feature(dav/file): Add readlink method
Browse files Browse the repository at this point in the history
  • Loading branch information
taminob committed Nov 7, 2023
1 parent f01c600 commit 2b19fe0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions apps/dav/lib/Connector/Sabre/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down

0 comments on commit 2b19fe0

Please sign in to comment.