diff options
author | icewind1991 <icewind1991@gmail.com> | 2013-08-19 03:38:55 -0700 |
---|---|---|
committer | icewind1991 <icewind1991@gmail.com> | 2013-08-19 03:38:55 -0700 |
commit | d7dde3cfbcb779f831130bdc65c8570437c73a71 (patch) | |
tree | 452ae55efd45a908f7f13b975438696ddbe4f4cf /lib/files/filesystem.php | |
parent | a1d5aba5fd3795a6ee4a87c96abf0d35d3f8116d (diff) | |
parent | d8c71ba734d95e954d4ff3af50a44b94f9f016ff (diff) | |
download | nextcloud-server-d7dde3cfbcb779f831130bdc65c8570437c73a71.tar.gz nextcloud-server-d7dde3cfbcb779f831130bdc65c8570437c73a71.zip |
Merge pull request #4467 from owncloud/storage-wrapper-quota
Move quota logic from filesystem proxy to storage wrapper
Diffstat (limited to 'lib/files/filesystem.php')
-rw-r--r-- | lib/files/filesystem.php | 17 |
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(); |