Merge "[FileBackend] Added tiny getContainerStoragePath() convenience function."
authorReedy <reedy@wikimedia.org>
Mon, 15 Oct 2012 22:49:54 +0000 (22:49 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 15 Oct 2012 22:49:54 +0000 (22:49 +0000)
includes/filebackend/FileBackend.php

index 1136fc2..0ef4cd0 100644 (file)
@@ -1073,6 +1073,17 @@ abstract class FileBackend {
                return "mwstore://{$this->name}";
        }
 
+       /**
+        * Get the storage path for the given container for this backend
+        *
+        * @param $container string Container name
+        * @return string Storage path
+        * @since 1.21
+        */
+       final public function getContainerStoragePath( $container ) {
+               return $this->getRootStoragePath() . "/{$container}";
+       }
+
        /**
         * Get the file journal object for this backend
         *