summaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage/wrapper/encryption.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files/storage/wrapper/encryption.php')
-rw-r--r--lib/private/files/storage/wrapper/encryption.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php
index 01bd861e3a2..df91b7189dc 100644
--- a/lib/private/files/storage/wrapper/encryption.php
+++ b/lib/private/files/storage/wrapper/encryption.php
@@ -111,6 +111,29 @@ class Encryption extends Wrapper {
}
/**
+ * @param $path
+ * @return array
+ */
+ public function getData($path) {
+ $data = $this->storage->getData($path);
+ $fullPath = $this->getFullPath($path);
+
+ if (isset($this->unencryptedSize[$fullPath])) {
+ $size = $this->unencryptedSize[$fullPath];
+
+ $data['encrypted'] = true;
+ $data['size'] = $size;
+ } else {
+ $info = $this->getCache()->get($path);
+ if (isset($info['fileid']) && $info['encrypted']) {
+ $data['encrypted'] = true;
+ $data['size'] = $info['size'];
+ }
+ }
+
+ return $data;
+ }
+ /**
* see http://php.net/manual/en/function.file_get_contents.php
*
* @param string $path