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

remotes/origin/poc-doctrine-migrations
Thomas Müller 11 years ago
parent 92b60e36de
commit 23f1bdc3d4
  1. 2
      lib/private/files/cache/scanner.php
  2. 2
      lib/private/files/storage/common.php
  3. 4
      lib/private/files/storage/storage.php
  4. 6
      lib/private/files/storage/wrapper/encryption.php
  5. 6
      lib/private/files/storage/wrapper/wrapper.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;

@ -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…
Cancel
Save