# FileWriter Struct Reference

Yes, simply writing to a file. More...

Inheritance diagram for FileWriter:

## Public Member Functions
| FileWriter (FILE *file)
| Create the file writer, so it writes to a specific file.
| ~FileWriter ()
| Make sure everything is cleaned up.
void | Write (byte *buf, size_t size)
| Write a given number of bytes into the savegame.
void | Finish ()
| Prepare everything to finish writing the savegame.
## Data Fields
FILE * | file
| The file to write to.

## Detailed Description

Yes, simply writing to a file.

Definition at line 1789 of file saveload.cpp.

## Constructor & Destructor Documentation

FileWriter::FileWriter | ( | FILE * | file | ) | `[inline]`

Create the file writer, so it writes to a specific file.

Parameters:

  | file | The file to write to.

Definition at line 1796 of file saveload.cpp.

FileWriter::~FileWriter | ( |  | ) | `[inline]`

Make sure everything is cleaned up.

Definition at line 1801 of file saveload.cpp.

References Finish(), and SaveLoadParams::sf.

## Member Function Documentation

void FileWriter::Write | ( | byte * | buf,
|  | size_t | len |
| ) |  |  | `[inline, virtual]`

Write a given number of bytes into the savegame.

Parameters:

  | buf | The bytes to write.
  | len | The number of bytes to write.

Implements SaveFilter.

Definition at line 1809 of file saveload.cpp.

References file, and SlError().

The documentation for this struct was generated from the following file:

- src/saveload/saveload.cpp