From 94560c68ba8974e72098e525ff1d96f11a3ae2e0 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 2 Jul 2013 16:34:58 +0200 Subject: rename constants --- lib/files/filesystem.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/files/filesystem.php') diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php index d6ebe7d629a..4281ebba99d 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 { /** -- cgit v1.2.3 From 5209cff371c448a5fec75882044b7a8e3ed05f95 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 25 Jul 2013 16:01:05 +0200 Subject: add conveince function to wrap all storages --- lib/files/filesystem.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/files/filesystem.php') diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php index 4281ebba99d..10ec5c41d11 100644 --- a/lib/files/filesystem.php +++ b/lib/files/filesystem.php @@ -149,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(); -- cgit v1.2.3