16 #ifndef _FILE_OFFSET_BITS 17 #define _FILE_OFFSET_BITS 64 33 m_file =
openFile(path.c_str(), mode);
41 return (
int)fread(buffer, 1, count, m_file);
50 return (
int)fwrite(buffer, 1, count, m_file);
59 return fflush(m_file);
69 status = fclose(m_file);
80 #if PLATFORM_IS_WINDOWS 82 long long pos = _ftelli64(m_file);
83 _fseeki64(m_file, 0, SEEK_END);
84 long long fileSize = _ftelli64(m_file);
85 _fseeki64(m_file, pos, SEEK_SET);
86 return fileSize - pos;
90 long long pos = ftello(m_file);
91 fseeko(m_file, 0, SEEK_END);
92 long long fileSize = ftello(m_file);
93 fseeko(m_file, pos, SEEK_SET);
94 return fileSize - pos;
106 return (feof(m_file) != 0);
int Read(void *buffer, int count) OVERRIDE
size_t count(InputIterator first, InputIterator last, T const &item)
FILE * openFile(const char *path, const char *mode)
long long GetBytesAvailableToRead() OVERRIDE
bool Open(const std::string &path, const char *mode)
int Write(const void *buffer, int count) OVERRIDE