diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php index 4281ebba99d1c1ddf0331865c7d21f90de04c757..10ec5c41d11eb97525bc96d42cb74b49cf79c87c 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();