]> source.dussan.org Git - nextcloud-server.git/commitdiff
add option to wrap existing mounts
authorRobin Appelman <icewind@owncloud.com>
Thu, 25 Jul 2013 14:00:24 +0000 (16:00 +0200)
committerRobin Appelman <icewind@owncloud.com>
Thu, 25 Jul 2013 14:00:24 +0000 (16:00 +0200)
lib/files/mount/manager.php
lib/files/mount/mount.php

index 25a5fe241cc131bc2b76aa401b95de9a97054ef9..4c432dcf7249c08853e9086c6d1a06cf07126721 100644 (file)
@@ -95,6 +95,13 @@ class Manager {
                return $result;
        }
 
+       /**
+        * @return Mount[]
+        */
+       public function getAll() {
+               return $this->mounts;
+       }
+
        /**
         * Find mounts by numeric storage id
         *
index 17b0055ee8468dc78dd14b4ee9fe5e1c0c00504b..0ce2f5975c719ae93347cf7dd208e01a8d4e172e 100644 (file)
@@ -138,4 +138,11 @@ class Mount {
                }
                return $path;
        }
+
+       /**
+        * @param callable $wrapper
+        */
+       public function wrapStorage($wrapper) {
+               $this->storage = $wrapper($this->mountPoint, $this->storage);
+       }
 }