summaryrefslogtreecommitdiffstats
path: root/lib/private/files
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files')
-rw-r--r--lib/private/files/storage/common.php9
-rw-r--r--lib/private/files/storage/local.php7
-rw-r--r--lib/private/files/storage/wrapper/wrapper.php8
3 files changed, 24 insertions, 0 deletions
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php
index 678bf419023..55b1471593d 100644
--- a/lib/private/files/storage/common.php
+++ b/lib/private/files/storage/common.php
@@ -370,4 +370,13 @@ abstract class Common implements \OC\Files\Storage\Storage {
public function free_space($path) {
return \OC\Files\SPACE_UNKNOWN;
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isLocal() {
+ // the common implementation returns a temporary file by
+ // default, which is not local
+ return false;
+ }
}
diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php
index db3c6bfca3a..fa0788f2377 100644
--- a/lib/private/files/storage/local.php
+++ b/lib/private/files/storage/local.php
@@ -298,5 +298,12 @@ if (\OC_Util::runningOnWindows()) {
public function hasUpdated($path, $time) {
return $this->filemtime($path) > $time;
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isLocal() {
+ return true;
+ }
}
}
diff --git a/lib/private/files/storage/wrapper/wrapper.php b/lib/private/files/storage/wrapper/wrapper.php
index f9adda80314..11ea9f71da7 100644
--- a/lib/private/files/storage/wrapper/wrapper.php
+++ b/lib/private/files/storage/wrapper/wrapper.php
@@ -432,4 +432,12 @@ class Wrapper implements \OC\Files\Storage\Storage {
public function test() {
return $this->storage->test();
}
+
+ /**
+ * Returns the wrapped storage's value for isLocal()
+ * @return bool wrapped storage's isLocal() value
+ */
+ public function isLocal() {
+ return $this->storage->isLocal();
+ }
}