original_string: protected function file_path_for_key($key, $create = false) {
          if ($this->singledirectory) {
              // Its a single directory, easy, just the store instances path + the file name.
              return $this->path . '/' . $key . '.cache';
          } else {
              // We are using a single subdirectory to achieve 1 level.
             // We suffix the subdir so it does not clash with any windows
             // reserved filenames like 'con'.
              $subdir = substr($key, 0, 3) . '-cache';
              $dir = $this->path . '/' . $subdir;
              if ($create) {
                  // Create the directory. This function does it recursivily!
                  make_writable_directory($dir, false);
              }
              return $dir . '/' . $key . '.cache';
          }
      }
code: protected function file_path_for_key($key, $create = false) {
          if ($this->singledirectory) {
              // Its a single directory, easy, just the store instances path + the file name.
              return $this->path . '/' . $key . '.cache';
          } else {
              // We are using a single subdirectory to achieve 1 level.
             // We suffix the subdir so it does not clash with any windows
             // reserved filenames like 'con'.
              $subdir = substr($key, 0, 3) . '-cache';
              $dir = $this->path . '/' . $subdir;
              if ($create) {
                  // Create the directory. This function does it recursivily!
                  make_writable_directory($dir, false);
              }
              return $dir . '/' . $key . '.cache';
          }
      }
code_tokens: protected function file_path_for_key ( $ key , $ create = false ) { if ( $ this -> singledirectory ) { // Its a single directory, easy, just the store instances path + the file name. return $ this -> path . '/' . $ key . '.cache' ; } else { // We are using a single subdirectory to achieve 1 level. // We suffix the subdir so it does not clash with any windows // reserved filenames like 'con'. $ subdir = substr ( $ key , 0 , 3 ) . '-cache' ; $ dir = $ this -> path . '/' . $ subdir ; if ( $ create ) { // Create the directory. This function does it recursivily! make_writable_directory ( $ dir , false ) ; } return $ dir . '/' . $ key . '.cache' ; } }
docstring: Returns the file path to use for the given key.
  
  @param string $key The key to generate a file path for.
  @param bool $create If set to the true the directory structure the key requires will be created.
  @return string The full path to the file that stores a particular cache key.
docstring_tokens: Returns the file path to use for the given key .