summaryrefslogtreecommitdiffstats
path: root/lib/files
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-07-25 16:01:05 +0200
committerRobin Appelman <icewind@owncloud.com>2013-07-25 16:01:05 +0200
commit5209cff371c448a5fec75882044b7a8e3ed05f95 (patch)
tree5d8bb17c8fe90766d5678a539eff30ce57864ec8 /lib/files
parentd042c8f1667c7fdf63c96c640acfe3af9cadeacf (diff)
downloadnextcloud-server-5209cff371c448a5fec75882044b7a8e3ed05f95.tar.gz
nextcloud-server-5209cff371c448a5fec75882044b7a8e3ed05f95.zip
add conveince function to wrap all storages
Diffstat (limited to 'lib/files')
-rw-r--r--lib/files/filesystem.php12
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();