Introduce Storage::getMetaData() to allow storage implementations more control over the data array
This commit is contained in:
parent
92b60e36de
commit
23f1bdc3d4
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -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])) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue