diff options
-rw-r--r-- | lib/files/filesystem.php | 12 |
1 files changed, 12 insertions, 0 deletions
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(); |