original_string: private function getIndex($key, $tags)
      {
          // tags folder
          $tagFolder = $this->createFolderNameFromTags($tags);
  
          if (!is_dir($tagFolder)) {
              mkdir($tagFolder, 0755, true);
          }
  
          // key folder
          $folder = $tagFolder . substr($key, 0, 2) . DIRECTORY_SEPARATOR . substr($key, 2,
                  2) . DIRECTORY_SEPARATOR . substr($key, 4, 2) . DIRECTORY_SEPARATOR;
          if (!is_dir($folder)) {
              mkdir($folder, 0755, true);
          }
  
          // check if index exists
          return $folder . 'index.db';
      }
code: private function getIndex($key, $tags)
      {
          // tags folder
          $tagFolder = $this->createFolderNameFromTags($tags);
  
          if (!is_dir($tagFolder)) {
              mkdir($tagFolder, 0755, true);
          }
  
          // key folder
          $folder = $tagFolder . substr($key, 0, 2) . DIRECTORY_SEPARATOR . substr($key, 2,
                  2) . DIRECTORY_SEPARATOR . substr($key, 4, 2) . DIRECTORY_SEPARATOR;
          if (!is_dir($folder)) {
              mkdir($folder, 0755, true);
          }
  
          // check if index exists
          return $folder . 'index.db';
      }
code_tokens: private function getIndex ( $ key , $ tags ) { // tags folder $ tagFolder = $ this -> createFolderNameFromTags ( $ tags ) ; if ( ! is_dir ( $ tagFolder ) ) { mkdir ( $ tagFolder , 0755 , true ) ; } // key folder $ folder = $ tagFolder . substr ( $ key , 0 , 2 ) . DIRECTORY_SEPARATOR . substr ( $ key , 2 , 2 ) . DIRECTORY_SEPARATOR . substr ( $ key , 4 , 2 ) . DIRECTORY_SEPARATOR ; if ( ! is_dir ( $ folder ) ) { mkdir ( $ folder , 0755 , true ) ; } // check if index exists return $ folder . 'index.db' ; }
docstring: Based on the provided key and tag list, a path to the index is created and returned.
  
  @param string $key
  @param string $tags
  
  @return string
docstring_tokens: Based on the provided key and tag list a path to the index is created and returned .