22 #ifndef AGS_SHARED_UTIL_FILE_STREAM_H 23 #define AGS_SHARED_UTIL_FILE_STREAM_H 25 #include "common/savefile.h" 26 #include "common/stream.h" 27 #include "common/std/functional.h" 28 #include "ags/shared/util/data_stream.h" 29 #include "ags/shared/util/file.h" 39 FileWorkMode WorkMode;
46 FileStream(
const String &file_name, FileOpenMode open_mode, FileWorkMode work_mode,
47 DataEndianess stream_endianess = kLittleEndian);
50 FileWorkMode GetWorkMode()
const {
return _workMode; }
52 bool HasErrors()
const override;
53 void Close()
override;
54 bool Flush()
override;
57 bool IsValid()
const override;
59 bool EOS()
const override;
61 soff_t GetLength()
const override;
63 soff_t GetPosition()
const override;
64 bool CanRead()
const override;
65 bool CanWrite()
const override;
66 bool CanSeek()
const override;
68 size_t Read(
void *buffer,
size_t size)
override;
69 int32_t ReadByte()
override;
70 size_t Write(
const void *buffer,
size_t size)
override;
71 int32_t WriteByte(uint8_t b)
override;
73 bool Seek(soff_t offset, StreamSeek origin)
override;
76 void Open(
const String &file_name, FileOpenMode open_mode, FileWorkMode work_mode);
81 const FileWorkMode _workMode;
Definition: achievements_tables.h:27
Definition: file_stream.h:35
Definition: savefile.h:54
Definition: file_stream.h:37
Definition: data_stream.h:40