1 #pragma once 2 3 #define _LARGEFILE64_SOURCE 4 #include <fcntl.h> 5 #include "Stream.h" 6 7 namespace Framework 8 { 9 10 class CPosixFileStream : public CStream 11 { 12 public: 13 CPosixFileStream(const char* path, int flags); 14 virtual ~CPosixFileStream(); 15 16 void Seek(int64, STREAM_SEEK_DIRECTION) override; 17 uint64 Tell() override; 18 uint64 Read(void*, uint64) override; 19 uint64 Write(const void*, uint64) override; 20 bool IsEOF() override; 21 void Flush() override; 22 23 private: 24 int m_fd = 0; 25 bool m_isEof = false; 26 }; 27 28 } 29