From f4b6a8aa08919a55cff48195725513d58f2d1da9 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 25 Jul 2013 16:00:24 +0200 Subject: [PATCH] add option to wrap existing mounts --- lib/files/mount/manager.php | 7 +++++++ lib/files/mount/mount.php | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/lib/files/mount/manager.php b/lib/files/mount/manager.php index 25a5fe241cc..4c432dcf724 100644 --- a/lib/files/mount/manager.php +++ b/lib/files/mount/manager.php @@ -95,6 +95,13 @@ class Manager { return $result; } + /** + * @return Mount[] + */ + public function getAll() { + return $this->mounts; + } + /** * Find mounts by numeric storage id * diff --git a/lib/files/mount/mount.php b/lib/files/mount/mount.php index 17b0055ee84..0ce2f5975c7 100644 --- a/lib/files/mount/mount.php +++ b/lib/files/mount/mount.php @@ -138,4 +138,11 @@ class Mount { } return $path; } + + /** + * @param callable $wrapper + */ + public function wrapStorage($wrapper) { + $this->storage = $wrapper($this->mountPoint, $this->storage); + } } -- 2.39.5