ezEngine  Milestone 7
FileWriter.h
1 #pragma once
2 
3 #include <Foundation/IO/Stream.h>
4 #include <Foundation/IO/FileSystem/Implementation/FileReaderWriterBase.h>
5 #include <Foundation/Containers/DynamicArray.h>
6 
11 class EZ_FOUNDATION_DLL ezFileWriter : public ezFileWriterBase
12 {
13  EZ_DISALLOW_COPY_AND_ASSIGN(ezFileWriter);
14 
15 public:
16 
19 
21  ~ezFileWriter() { Close(); }
22 
27  ezResult Open(const char* szFile, ezUInt32 uiCacheSize = 1024 * 1024, bool bAllowFileEvents = true);
28 
30  void Close();
31 
35  virtual ezResult WriteBytes(const void* pWriteBuffer, ezUInt64 uiBytesToWrite) override;
36 
42  virtual ezResult Flush() override;
43 
44 private:
45  ezUInt64 m_uiCacheWritePosition;
47 
48 };
49 
50 
51 
52 
53 
54 
55 
56 
57