Merge pull request #22200 from owncloud/node-checksum-resolvefileinfo

Make sure fileinfo exists when calling getCheckSum in node API
This commit is contained in:
Thomas Müller 2016-02-08 16:10:31 +01:00
commit ec399e6bbc
2 changed files with 11 additions and 1 deletions

View file

@ -169,6 +169,6 @@ class File extends Node implements \OCP\Files\File {
* @inheritdoc
*/
public function getChecksum() {
return $this->fileInfo->getChecksum();
return $this->getFileInfo()->getChecksum();
}
}

View file

@ -84,4 +84,14 @@ interface File extends Node {
* @since 6.0.0
*/
public function hash($type, $raw = false);
/**
* Get the stored checksum for this file
*
* @return string
* @since 9.0.0
* @throws InvalidPathException
* @throws NotFoundException
*/
public function getChecksum();
}