| 38 | } |
| 39 | |
| 40 | void FileWriteStream::Flush() |
| 41 | { |
| 42 | // Check if need to flush |
| 43 | if (_virtualPosInBuffer > 0) |
| 44 | { |
| 45 | // Update buffer |
| 46 | uint32 bytesWritten; |
| 47 | _hasError |= _file->Write(_buffer, _virtualPosInBuffer, &bytesWritten) != 0; |
| 48 | _virtualPosInBuffer = 0; |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | void FileWriteStream::Close() |
| 53 | { |