original_string: private function saveFileToCache(FileInterface $file)
      {
          $cachedPath = sys_get_temp_dir() . self::CACHE_DIR . $file->getRelativePath();
  
          if (! is_dir(dirname($cachedPath))) {
              mkdir(dirname($cachedPath), 0700, true);
          }
  
          $cmd = sprintf('git show :%s > %s', $file->getRelativePath(), $cachedPath);
          $process = new Process($cmd);
          $process->run();
  
          $file->setCachedPath($cachedPath);
  
          return $file;
      }
code: private function saveFileToCache(FileInterface $file)
      {
          $cachedPath = sys_get_temp_dir() . self::CACHE_DIR . $file->getRelativePath();
  
          if (! is_dir(dirname($cachedPath))) {
              mkdir(dirname($cachedPath), 0700, true);
          }
  
          $cmd = sprintf('git show :%s > %s', $file->getRelativePath(), $cachedPath);
          $process = new Process($cmd);
          $process->run();
  
          $file->setCachedPath($cachedPath);
  
          return $file;
      }
code_tokens: private function saveFileToCache ( FileInterface $ file ) { $ cachedPath = sys_get_temp_dir ( ) . self :: CACHE_DIR . $ file -> getRelativePath ( ) ; if ( ! is_dir ( dirname ( $ cachedPath ) ) ) { mkdir ( dirname ( $ cachedPath ) , 0700 , true ) ; } $ cmd = sprintf ( 'git show :%s > %s' , $ file -> getRelativePath ( ) , $ cachedPath ) ; $ process = new Process ( $ cmd ) ; $ process -> run ( ) ; $ file -> setCachedPath ( $ cachedPath ) ; return $ file ; }
docstring: Saves a copy of the cached version of the given file to a temp directory.
  
  @param  FileInterface $file
  @return FileInterface
docstring_tokens: Saves a copy of the cached version of the given file to a temp directory .