aboutsummaryrefslogtreecommitdiffstats
path: root/lib/files/filesystem.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-06-07 17:07:13 +0200
committerRobin Appelman <icewind@owncloud.com>2013-06-07 17:07:13 +0200
commitbd675124096707a925faac2774516975ec7049c1 (patch)
tree795bb623392030c23d18ad466df6596f96f4b62b /lib/files/filesystem.php
parentd97ef0805ba5c5687e0642bb8f7c085966153ac9 (diff)
downloadnextcloud-server-bd675124096707a925faac2774516975ec7049c1.tar.gz
nextcloud-server-bd675124096707a925faac2774516975ec7049c1.zip
manage creating and wrapping storages in it's own class
Diffstat (limited to 'lib/files/filesystem.php')
-rw-r--r--lib/files/filesystem.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index eadd8a93faf..ce89c5c23ff 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,11 @@ class Filesystem {
const signal_param_run = 'run';
/**
+ * @var \OC\Files\Storage\Loader $loader
+ */
+ private static $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
@@ -221,6 +227,7 @@ class Filesystem {
if (self::$defaultInstance) {
return false;
}
+ self::$loader = new Loader();
self::$defaultInstance = new View($root);
self::$mounts = new Mount\Manager();
@@ -232,7 +239,7 @@ class Filesystem {
return true;
}
- static public function initMounts(){
+ static public function initMounts() {
self::$mounts = new Mount\Manager();
}
@@ -365,7 +372,7 @@ class Filesystem {
* @param string $mountpoint
*/
static public function mount($class, $arguments, $mountpoint) {
- $mount = new Mount\Mount($class, $mountpoint, $arguments);
+ $mount = new Mount\Mount($class, $mountpoint, $arguments, self::$loader);
self::$mounts->addMount($mount);
}