From: Robin Appelman Date: Thu, 25 Jul 2013 14:00:24 +0000 (+0200) Subject: add option to wrap existing mounts X-Git-Tag: v6.0.0alpha2~290^2~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f4b6a8aa08919a55cff48195725513d58f2d1da9;p=nextcloud-server.git add option to wrap existing mounts --- 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); + } }