Merge pull request #14567 from owncloud/node-check-fileinfo-interface

Add "throws" lines to calling methods and interface aswell
This commit is contained in:
Joas Schilling 2015-02-27 15:15:09 +01:00
commit c5a9bad919
2 changed files with 41 additions and 0 deletions

View File

@ -152,6 +152,8 @@ class Node implements \OCP\Files\Node {
/** /**
* @return int * @return int
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function getId() { public function getId() {
return $this->getFileInfo()->getId(); return $this->getFileInfo()->getId();
@ -166,6 +168,8 @@ class Node implements \OCP\Files\Node {
/** /**
* @return int * @return int
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function getMTime() { public function getMTime() {
return $this->getFileInfo()->getMTime(); return $this->getFileInfo()->getMTime();
@ -173,6 +177,8 @@ class Node implements \OCP\Files\Node {
/** /**
* @return int * @return int
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function getSize() { public function getSize() {
return $this->getFileInfo()->getSize(); return $this->getFileInfo()->getSize();
@ -180,6 +186,8 @@ class Node implements \OCP\Files\Node {
/** /**
* @return string * @return string
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function getEtag() { public function getEtag() {
return $this->getFileInfo()->getEtag(); return $this->getFileInfo()->getEtag();
@ -187,6 +195,8 @@ class Node implements \OCP\Files\Node {
/** /**
* @return int * @return int
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function getPermissions() { public function getPermissions() {
return $this->getFileInfo()->getPermissions(); return $this->getFileInfo()->getPermissions();
@ -194,6 +204,8 @@ class Node implements \OCP\Files\Node {
/** /**
* @return bool * @return bool
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function isReadable() { public function isReadable() {
return $this->getFileInfo()->isReadable(); return $this->getFileInfo()->isReadable();
@ -201,6 +213,8 @@ class Node implements \OCP\Files\Node {
/** /**
* @return bool * @return bool
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function isUpdateable() { public function isUpdateable() {
return $this->getFileInfo()->isUpdateable(); return $this->getFileInfo()->isUpdateable();
@ -208,6 +222,8 @@ class Node implements \OCP\Files\Node {
/** /**
* @return bool * @return bool
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function isDeletable() { public function isDeletable() {
return $this->getFileInfo()->isDeletable(); return $this->getFileInfo()->isDeletable();
@ -215,11 +231,18 @@ class Node implements \OCP\Files\Node {
/** /**
* @return bool * @return bool
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function isShareable() { public function isShareable() {
return $this->getFileInfo()->isShareable(); return $this->getFileInfo()->isShareable();
} }
/**
* @return bool
* @throws InvalidPathException
* @throws NotFoundException
*/
public function isCreatable() { public function isCreatable() {
return $this->getFileInfo()->isCreatable(); return $this->getFileInfo()->isCreatable();
} }

View File

@ -89,6 +89,8 @@ interface Node extends FileInfo {
* Get the internal file id for the file or folder * Get the internal file id for the file or folder
* *
* @return int * @return int
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function getId(); public function getId();
@ -106,6 +108,8 @@ interface Node extends FileInfo {
* Get the modified date of the file or folder as unix timestamp * Get the modified date of the file or folder as unix timestamp
* *
* @return int * @return int
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function getMTime(); public function getMTime();
@ -113,6 +117,8 @@ interface Node extends FileInfo {
* Get the size of the file or folder in bytes * Get the size of the file or folder in bytes
* *
* @return int * @return int
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function getSize(); public function getSize();
@ -122,6 +128,8 @@ interface Node extends FileInfo {
* every time the file or folder is changed the Etag will change to * every time the file or folder is changed the Etag will change to
* *
* @return string * @return string
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function getEtag(); public function getEtag();
@ -135,6 +143,8 @@ interface Node extends FileInfo {
* - \OCP\Constants::PERMISSION_SHARE * - \OCP\Constants::PERMISSION_SHARE
* *
* @return int * @return int
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function getPermissions(); public function getPermissions();
@ -142,6 +152,8 @@ interface Node extends FileInfo {
* Check if the file or folder is readable * Check if the file or folder is readable
* *
* @return bool * @return bool
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function isReadable(); public function isReadable();
@ -149,6 +161,8 @@ interface Node extends FileInfo {
* Check if the file or folder is writable * Check if the file or folder is writable
* *
* @return bool * @return bool
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function isUpdateable(); public function isUpdateable();
@ -156,6 +170,8 @@ interface Node extends FileInfo {
* Check if the file or folder is deletable * Check if the file or folder is deletable
* *
* @return bool * @return bool
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function isDeletable(); public function isDeletable();
@ -163,6 +179,8 @@ interface Node extends FileInfo {
* Check if the file or folder is shareable * Check if the file or folder is shareable
* *
* @return bool * @return bool
* @throws InvalidPathException
* @throws NotFoundException
*/ */
public function isShareable(); public function isShareable();