aboutsummaryrefslogtreecommitdiffstats
path: root/lib/files/filesystem.php
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-08-20 17:20:30 +0200
committerkondou <kondou@ts.unde.re>2013-08-20 17:20:30 +0200
commitf1518a54dffb4a309da3952e154b71d4bc9482f8 (patch)
treeb6faeec269eb8904c5c8f42732e5466758fdeb0e /lib/files/filesystem.php
parent65d802329f8307cd010a306073d2d3ffd7dc7b74 (diff)
parentde949b1caa4491a8016ed5e609fc781526fea54d (diff)
downloadnextcloud-server-f1518a54dffb4a309da3952e154b71d4bc9482f8.tar.gz
nextcloud-server-f1518a54dffb4a309da3952e154b71d4bc9482f8.zip
Merge branch 'master' into clean_up_util
Conflicts: lib/util.php
Diffstat (limited to 'lib/files/filesystem.php')
-rw-r--r--lib/files/filesystem.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index d6ebe7d629a..10ec5c41d11 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -31,8 +31,9 @@
namespace OC\Files;
use OC\Files\Storage\Loader;
-const FREE_SPACE_UNKNOWN = -2;
-const FREE_SPACE_UNLIMITED = -3;
+const SPACE_NOT_COMPUTED = -1;
+const SPACE_UNKNOWN = -2;
+const SPACE_UNLIMITED = -3;
class Filesystem {
/**
@@ -148,6 +149,18 @@ class Filesystem {
*/
private static $loader;
+ /**
+ * @param callable $wrapper
+ */
+ public static function addStorageWrapper($wrapper) {
+ self::getLoader()->addStorageWrapper($wrapper);
+
+ $mounts = self::getMountManager()->getAll();
+ foreach ($mounts as $mount) {
+ $mount->wrapStorage($wrapper);
+ }
+ }
+
public static function getLoader() {
if (!self::$loader) {
self::$loader = new Loader();