summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Node/File.php
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-11-28 14:17:15 +0100
committerJulius Härtl <jus@bitgrid.net>2019-11-28 14:17:15 +0100
commit9eb1554fadf79af54c465f0729ab1de9f24e447d (patch)
treea8ce16563f64bb62406d9fe97d7c5df81b8a3de5 /lib/private/Files/Node/File.php
parent6b97f6af48ba8dc029e616cf778a1cbcd0fea001 (diff)
downloadnextcloud-server-9eb1554fadf79af54c465f0729ab1de9f24e447d.tar.gz
nextcloud-server-9eb1554fadf79af54c465f0729ab1de9f24e447d.zip
Properly anotate LockedException in files node api
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Files/Node/File.php')
-rw-r--r--lib/private/Files/Node/File.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/private/Files/Node/File.php b/lib/private/Files/Node/File.php
index b504c7a29da..e4669f70709 100644
--- a/lib/private/Files/Node/File.php
+++ b/lib/private/Files/Node/File.php
@@ -28,6 +28,7 @@ namespace OC\Files\Node;
use OCP\Files\GenericFileException;
use OCP\Files\NotPermittedException;
+use OCP\Lock\LockedException;
class File extends Node implements \OCP\Files\File {
/**
@@ -42,7 +43,8 @@ class File extends Node implements \OCP\Files\File {
/**
* @return string
- * @throws \OCP\Files\NotPermittedException
+ * @throws NotPermittedException
+ * @throws LockedException
*/
public function getContent() {
if ($this->checkPermissions(\OCP\Constants::PERMISSION_READ)) {
@@ -57,8 +59,9 @@ class File extends Node implements \OCP\Files\File {
/**
* @param string|resource $data
- * @throws \OCP\Files\NotPermittedException
+ * @throws NotPermittedException
* @throws \OCP\Files\GenericFileException
+ * @throws LockedException
*/
public function putContent($data) {
if ($this->checkPermissions(\OCP\Constants::PERMISSION_UPDATE)) {
@@ -76,7 +79,8 @@ class File extends Node implements \OCP\Files\File {
/**
* @param string $mode
* @return resource
- * @throws \OCP\Files\NotPermittedException
+ * @throws NotPermittedException
+ * @throws LockedException
*/
public function fopen($mode) {
$preHooks = array();
@@ -113,6 +117,11 @@ class File extends Node implements \OCP\Files\File {
}
}
+ /**
+ * @throws NotPermittedException
+ * @throws \OCP\Files\InvalidPathException
+ * @throws \OCP\Files\NotFoundException
+ */
public function delete() {
if ($this->checkPermissions(\OCP\Constants::PERMISSION_DELETE)) {
$this->sendHooks(array('preDelete'));