Introduce Storage::getMetaData() to allow storage implementations more control over the data array

This commit is contained in:
Thomas Müller 2015-04-20 14:54:54 +02:00
parent 92b60e36de
commit 23f1bdc3d4
5 changed files with 10 additions and 10 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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);
}

View File

@ -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])) {

View File

@ -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);
}
}