From: Thomas Müller Date: Mon, 20 Apr 2015 12:54:54 +0000 (+0200) Subject: Introduce Storage::getMetaData() to allow storage implementations more control over... X-Git-Tag: v8.1.0alpha2~19^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=23f1bdc3d4682dbb2e8d1a82921d62dbe0b213be;p=nextcloud-server.git Introduce Storage::getMetaData() to allow storage implementations more control over the data array --- diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index c1ba7c01461..713dcda3ac3 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -110,7 +110,7 @@ class Scanner extends BasicEmitter { return null; } - $data = $this->storage->getData($path); + $data = $this->storage->getMetaData($path); $data['permissions'] = $permissions; return $data; diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index 0294fc4b5be..76678218054 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -584,7 +584,7 @@ abstract class Common implements Storage { /** * @inheritdoc */ - public function getData($path) { + public function getMetaData($path) { $data = []; $data['mimetype'] = $this->getMimeType($path); $data['mtime'] = $this->filemtime($path); diff --git a/lib/private/files/storage/storage.php b/lib/private/files/storage/storage.php index 9fda743afcf..07b5633c908 100644 --- a/lib/private/files/storage/storage.php +++ b/lib/private/files/storage/storage.php @@ -71,9 +71,9 @@ interface Storage extends \OCP\Files\Storage { public function getStorageCache(); /** - * @param $path + * @param string $path * @return array */ - public function getData($path); + public function getMetaData($path); } diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php index df91b7189dc..125e5f0f57e 100644 --- a/lib/private/files/storage/wrapper/encryption.php +++ b/lib/private/files/storage/wrapper/encryption.php @@ -111,11 +111,11 @@ class Encryption extends Wrapper { } /** - * @param $path + * @param string $path * @return array */ - public function getData($path) { - $data = $this->storage->getData($path); + public function getMetaData($path) { + $data = $this->storage->getMetaData($path); $fullPath = $this->getFullPath($path); if (isset($this->unencryptedSize[$fullPath])) { diff --git a/lib/private/files/storage/wrapper/wrapper.php b/lib/private/files/storage/wrapper/wrapper.php index 0bea457c877..f3dc09db138 100644 --- a/lib/private/files/storage/wrapper/wrapper.php +++ b/lib/private/files/storage/wrapper/wrapper.php @@ -527,10 +527,10 @@ class Wrapper implements \OC\Files\Storage\Storage { } /** - * @param $path + * @param string $path * @return array */ - public function getData($path) { - return $this->storage->getData($path); + public function getMetaData($path) { + return $this->storage->getMetaData($path); } }