From: Robin Appelman Date: Thu, 25 Jul 2013 14:01:05 +0000 (+0200) Subject: add conveince function to wrap all storages X-Git-Tag: v6.0.0alpha2~290^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5209cff371c448a5fec75882044b7a8e3ed05f95;p=nextcloud-server.git add conveince function to wrap all storages --- 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();