aboutsummaryrefslogtreecommitdiffstats
path: root/lib/files/filesystem.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-06-29 04:00:03 -0700
committerBart Visscher <bartv@thisnet.nl>2013-06-29 04:00:03 -0700
commitd699ee9845b17ddb0945f263e4370e453ef48684 (patch)
tree6307a70543fdda4134e840fe18f28df96f41e886 /lib/files/filesystem.php
parent68c0d54568bb70f5bf7d30551beecd1fa3704683 (diff)
parenta7c70915d592cd3cc06c6dc86ba3d2707d000871 (diff)
downloadnextcloud-server-d699ee9845b17ddb0945f263e4370e453ef48684.tar.gz
nextcloud-server-d699ee9845b17ddb0945f263e4370e453ef48684.zip
Merge pull request #3635 from owncloud/storage-wrapper
Give apps the option to wrap storage backends
Diffstat (limited to 'lib/files/filesystem.php')
-rw-r--r--lib/files/filesystem.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index d3fddf8c421..3d7d5abf8fe 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -30,6 +30,7 @@
namespace OC\Files;
+use OC\Files\Storage\Loader;
const FREE_SPACE_UNKNOWN = -2;
const FREE_SPACE_UNLIMITED = -3;
@@ -143,6 +144,18 @@ class Filesystem {
const signal_param_run = 'run';
/**
+ * @var \OC\Files\Storage\Loader $loader
+ */
+ private static $loader;
+
+ public static function getLoader(){
+ if (!self::$loader) {
+ self::$loader = new Loader();
+ }
+ return self::$loader;
+ }
+
+ /**
* get the mountpoint of the storage object for a path
* ( note: because a storage is not always mounted inside the fakeroot, the
* returned mountpoint is relative to the absolute root of the filesystem
@@ -239,6 +252,7 @@ class Filesystem {
if (self::$defaultInstance) {
return false;
}
+ self::getLoader();
self::$defaultInstance = new View($root);
if (!self::$mounts) {
@@ -393,7 +407,7 @@ class Filesystem {
if (!self::$mounts) {
\OC_Util::setupFS();
}
- $mount = new Mount\Mount($class, $mountpoint, $arguments);
+ $mount = new Mount\Mount($class, $mountpoint, $arguments, self::getLoader());
self::$mounts->addMount($mount);
}