original_string: public function write_new_file($content, $name, $manifest=true) {
          $fs = get_file_storage();
          $file_record = $this->new_file_record_base($name);
          if (empty($manifest) && ($dir = $this->get('format')->get_file_directory())) {
              $file_record->filepath = '/' . $dir . '/';
          }
          return $fs->create_file_from_string($file_record, $content);
      }
code: public function write_new_file($content, $name, $manifest=true) {
          $fs = get_file_storage();
          $file_record = $this->new_file_record_base($name);
          if (empty($manifest) && ($dir = $this->get('format')->get_file_directory())) {
              $file_record->filepath = '/' . $dir . '/';
          }
          return $fs->create_file_from_string($file_record, $content);
      }
code_tokens: public function write_new_file ( $ content , $ name , $ manifest = true ) { $ fs = get_file_storage ( ) ; $ file_record = $ this -> new_file_record_base ( $ name ) ; if ( empty ( $ manifest ) && ( $ dir = $ this -> get ( 'format' ) -> get_file_directory ( ) ) ) { $ file_record -> filepath = '/' . $ dir . '/' ; } return $ fs -> create_file_from_string ( $ file_record , $ content ) ; }
docstring: Writes out some content to a file
  in the portfolio temporary working directory
  associated with this export.
  
  @param string $content content to write
  @param string $name filename to use
  @param bool $manifest whether this is the main file or an secondary file (eg attachment)
  @return stored_file
docstring_tokens: Writes out some content to a file in the portfolio temporary working directory associated with this export .