Merge pull request #22200 from owncloud/node-checksum-resolvefileinfo
Make sure fileinfo exists when calling getCheckSum in node API
This commit is contained in:
commit
ec399e6bbc
|
@ -169,6 +169,6 @@ class File extends Node implements \OCP\Files\File {
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
public function getChecksum() {
|
public function getChecksum() {
|
||||||
return $this->fileInfo->getChecksum();
|
return $this->getFileInfo()->getChecksum();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,4 +84,14 @@ interface File extends Node {
|
||||||
* @since 6.0.0
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
public function hash($type, $raw = false);
|
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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue