X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/530ecef01f7e33c2ec1b8b1ad8025484709bef1d..2dab040a1dc3c714a98f005c6b79802180d25352:/src/common/wfstream.cpp diff --git a/src/common/wfstream.cpp b/src/common/wfstream.cpp index 572d2be6d5..5bc7cf1ce2 100644 --- a/src/common/wfstream.cpp +++ b/src/common/wfstream.cpp @@ -107,6 +107,11 @@ wxFileOffset wxFileInputStream::OnSysTell() const return m_file->Tell(); } +bool wxFileInputStream::IsOk() const +{ + return (wxStreamBase::IsOk() && m_file->IsOpened()); +} + // ---------------------------------------------------------------------------- // wxFileOutputStream // ---------------------------------------------------------------------------- @@ -178,6 +183,11 @@ wxFileOffset wxFileOutputStream::GetLength() const return m_file->Length(); } +bool wxFileOutputStream::IsOk() const +{ + return (wxStreamBase::IsOk() && m_file->IsOpened()); +} + // ---------------------------------------------------------------------------- // wxTempFileOutputStream // ---------------------------------------------------------------------------- @@ -224,7 +234,7 @@ wxFileStream::wxFileStream(const wxString& fileName) // ---------------------------------------------------------------------------- wxFFileInputStream::wxFFileInputStream(const wxString& fileName, - const wxChar *mode) + const wxString& mode) : wxInputStream() { m_file = new wxFFile(fileName, mode); @@ -290,12 +300,17 @@ wxFileOffset wxFFileInputStream::OnSysTell() const return m_file->Tell(); } +bool wxFFileInputStream::IsOk() const +{ + return (wxStreamBase::IsOk() && m_file->IsOpened()); +} + // ---------------------------------------------------------------------------- // wxFFileOutputStream // ---------------------------------------------------------------------------- wxFFileOutputStream::wxFFileOutputStream(const wxString& fileName, - const wxChar *mode) + const wxString& mode) { m_file = new wxFFile(fileName, mode); m_file_destroy = true; @@ -371,6 +386,11 @@ wxFileOffset wxFFileOutputStream::GetLength() const return m_file->Length(); } +bool wxFFileOutputStream::IsOk() const +{ + return (wxStreamBase::IsOk() && m_file->IsOpened()); +} + // ---------------------------------------------------------------------------- // wxFFileStream // ----------------------------------------------------------------------------