[FileBackend] Added tiny getContainerStoragePath() convenience function.
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 10 Oct 2012 22:06:19 +0000 (15:06 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 10 Oct 2012 22:11:26 +0000 (15:11 -0700)
Change-Id: Icc16c75f0cbfcf247628d0649386e52f1f25d335

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
         *