original_string: private function openDownloadStreamByFile(stdClass $file)
      {
          $path = $this->createPathForFile($file);
          $context = stream_context_create([
              self::$streamWrapperProtocol => [
                  'collectionWrapper' => $this->collectionWrapper,
                  'file' => $file,
              ],
          ]);
  
          return fopen($path, 'r', false, $context);
      }
code: private function openDownloadStreamByFile(stdClass $file)
      {
          $path = $this->createPathForFile($file);
          $context = stream_context_create([
              self::$streamWrapperProtocol => [
                  'collectionWrapper' => $this->collectionWrapper,
                  'file' => $file,
              ],
          ]);
  
          return fopen($path, 'r', false, $context);
      }
code_tokens: private function openDownloadStreamByFile ( stdClass $ file ) { $ path = $ this -> createPathForFile ( $ file ) ; $ context = stream_context_create ( [ self :: $ streamWrapperProtocol => [ 'collectionWrapper' => $ this -> collectionWrapper , 'file' => $ file , ] , ] ) ; return fopen ( $ path , 'r' , false , $ context ) ; }
docstring: Opens a readable stream for the GridFS file.
  
  @param stdClass $file GridFS file document
  @return resource
docstring_tokens: Opens a readable stream for the GridFS file .