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; }
54 bool GetError()
const override;
55 void Close()
override;
56 bool Flush()
override;
59 bool IsValid()
const override;
61 bool EOS()
const override;
63 soff_t GetLength()
const override;
65 soff_t GetPosition()
const override;
66 bool CanRead()
const override;
67 bool CanWrite()
const override;
68 bool CanSeek()
const override;
70 size_t Read(
void *buffer,
size_t size)
override;
71 int32_t ReadByte()
override;
72 size_t Write(
const void *buffer,
size_t size)
override;
73 int32_t WriteByte(uint8_t b)
override;
75 soff_t Seek(soff_t offset, StreamSeek origin)
override;
78 void Open(
const String &file_name, FileOpenMode open_mode, FileWorkMode work_mode);
83 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