summaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage/common.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files/storage/common.php')
-rw-r--r--lib/private/files/storage/common.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php
index 847cb8492fe..a5ed5fd3996 100644
--- a/lib/private/files/storage/common.php
+++ b/lib/private/files/storage/common.php
@@ -338,7 +338,7 @@ abstract class Common implements Storage {
}
if (!isset($this->watcher)) {
$this->watcher = new Watcher($storage);
- $globalPolicy = \OC::$server->getConfig()->getSystemValue('filesystem_check_changes', Watcher::CHECK_ONCE);
+ $globalPolicy = \OC::$server->getConfig()->getSystemValue('filesystem_check_changes', Watcher::CHECK_NEVER);
$this->watcher->setPolicy((int)$this->getMountOption('filesystem_check_changes', $globalPolicy));
}
return $this->watcher;
@@ -404,6 +404,11 @@ abstract class Common implements Storage {
return implode('/', $output);
}
+ /**
+ * Test a storage for availability
+ *
+ * @return bool
+ */
public function test() {
if ($this->stat('')) {
return true;
@@ -650,4 +655,18 @@ abstract class Common implements Storage {
public function changeLock($path, $type, ILockingProvider $provider) {
$provider->changeLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type);
}
+
+ /**
+ * @return array [ available, last_checked ]
+ */
+ public function getAvailability() {
+ return $this->getStorageCache()->getAvailability();
+ }
+
+ /**
+ * @param bool $isAvailable
+ */
+ public function setAvailability($isAvailable) {
+ $this->getStorageCache()->setAvailability($isAvailable);
+ }
}