summaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage/common.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-04-20 14:25:39 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-20 14:25:39 +0200
commit92b60e36de8d89e8ea7c4781a8c5d5fa4371b7c3 (patch)
tree4b8cd51bbac054669d76a0ee53da3fa2773aadae /lib/private/files/storage/common.php
parent3959f8ac4e979f9c1fcaef3d18deb0c7c858f560 (diff)
downloadnextcloud-server-92b60e36de8d89e8ea7c4781a8c5d5fa4371b7c3.tar.gz
nextcloud-server-92b60e36de8d89e8ea7c4781a8c5d5fa4371b7c3.zip
Introduce Storage::getData() to allow storage implementations more control over the data array
Diffstat (limited to 'lib/private/files/storage/common.php')
-rw-r--r--lib/private/files/storage/common.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php
index 66ed713e22d..0294fc4b5be 100644
--- a/lib/private/files/storage/common.php
+++ b/lib/private/files/storage/common.php
@@ -580,4 +580,21 @@ abstract class Common implements Storage {
}
return $result;
}
+
+ /**
+ * @inheritdoc
+ */
+ public function getData($path) {
+ $data = [];
+ $data['mimetype'] = $this->getMimeType($path);
+ $data['mtime'] = $this->filemtime($path);
+ if ($data['mimetype'] == 'httpd/unix-directory') {
+ $data['size'] = -1; //unknown
+ } else {
+ $data['size'] = $this->filesize($path);
+ }
+ $data['etag'] = $this->getETag($path);
+ $data['storage_mtime'] = $data['mtime'];
+ return $data;
+ }
}