X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..c01920998145b5248372a124fdcd53f0ba1582d5:/include/wx/wfstream.h diff --git a/include/wx/wfstream.h b/include/wx/wfstream.h index a0cb69e11e..b26ec29f5b 100644 --- a/include/wx/wfstream.h +++ b/include/wx/wfstream.h @@ -37,7 +37,7 @@ class WXDLLIMPEXP_BASE wxFileInputStream: public wxInputStream { wxFileInputStream(int fd); ~wxFileInputStream(); - size_t GetSize() const; + wxFileOffset GetLength() const; bool Ok() const { return m_file->IsOpened(); } @@ -45,8 +45,8 @@ class WXDLLIMPEXP_BASE wxFileInputStream: public wxInputStream { wxFileInputStream(); size_t OnSysRead(void *buffer, size_t size); - off_t OnSysSeek(off_t pos, wxSeekMode mode); - off_t OnSysTell() const; + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + wxFileOffset OnSysTell() const; protected: wxFile *m_file; @@ -67,7 +67,8 @@ class WXDLLIMPEXP_BASE wxFileOutputStream: public wxOutputStream { // { return wxOutputStream::Write(buffer, size); } void Sync(); - size_t GetSize() const; + bool Close() { return m_file_destroy ? m_file->Close() : true; } + wxFileOffset GetLength() const; bool Ok() const { return m_file->IsOpened(); } @@ -75,8 +76,8 @@ class WXDLLIMPEXP_BASE wxFileOutputStream: public wxOutputStream { wxFileOutputStream(); size_t OnSysWrite(const void *buffer, size_t size); - off_t OnSysSeek(off_t pos, wxSeekMode mode); - off_t OnSysTell() const; + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + wxFileOffset OnSysTell() const; protected: wxFile *m_file; @@ -106,7 +107,7 @@ class WXDLLIMPEXP_BASE wxFFileInputStream: public wxInputStream { wxFFileInputStream(FILE *file); ~wxFFileInputStream(); - size_t GetSize() const; + wxFileOffset GetLength() const; bool Ok() const { return m_file->IsOpened(); } @@ -114,8 +115,8 @@ class WXDLLIMPEXP_BASE wxFFileInputStream: public wxInputStream { wxFFileInputStream(); size_t OnSysRead(void *buffer, size_t size); - off_t OnSysSeek(off_t pos, wxSeekMode mode); - off_t OnSysTell() const; + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + wxFileOffset OnSysTell() const; protected: wxFFile *m_file; @@ -136,7 +137,8 @@ class WXDLLIMPEXP_BASE wxFFileOutputStream: public wxOutputStream { // { return wxOutputStream::Write(buffer, size); } void Sync(); - size_t GetSize() const; + bool Close() { return m_file_destroy ? m_file->Close() : true; } + wxFileOffset GetLength() const; bool Ok() const { return m_file->IsOpened(); } @@ -144,8 +146,8 @@ class WXDLLIMPEXP_BASE wxFFileOutputStream: public wxOutputStream { wxFFileOutputStream(); size_t OnSysWrite(const void *buffer, size_t size); - off_t OnSysSeek(off_t pos, wxSeekMode mode); - off_t OnSysTell() const; + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + wxFileOffset OnSysTell() const; protected: wxFFile *m_file;