// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "wfstream.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
{
m_file = new wxFile(fileName, wxFile::read);
m_file_destroy = true;
+ if ( !m_file->IsOpened() )
+ m_lasterror = wxSTREAM_READ_ERROR;
}
wxFileInputStream::wxFileInputStream()
m_file_destroy = true;
if (!m_file->IsOpened())
- {
m_lasterror = wxSTREAM_WRITE_ERROR;
- }
- else
- {
- if (m_file->Error())
- m_lasterror = wxSTREAM_WRITE_ERROR;
- }
}
wxFileOutputStream::wxFileOutputStream(wxFile& file)
{
m_file = new wxFFile(fileName, mode);
m_file_destroy = true;
+
+ if (!m_file->IsOpened())
+ m_lasterror = wxSTREAM_WRITE_ERROR;
}
wxFFileInputStream::wxFFileInputStream()