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);
    }
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);
    }
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 ) ; }
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
Writes out some content to a file in the portfolio temporary working directory associated with this export .