#pragma hdrstop
#endif
-#ifndef WX_PRECOMP
- #include "wx/defs.h"
-#endif
-
#if wxUSE_STREAMS && wxUSE_FILE
#include <stdio.h>
-#include <wx/stream.h>
-#include <wx/wfstream.h>
+#include "wx/stream.h"
+#include "wx/wfstream.h"
// ----------------------------------------------------------------------------
// wxFileInputStream
return 0;
}
-size_t wxFileInputStream::StreamSize() const
+size_t wxFileInputStream::GetSize() const
{
return m_file->Length();
}
size_t wxFileOutputStream::OnSysWrite(const void *buffer, size_t size)
{
size_t ret = m_file->Write(buffer, size);
- m_lasterror = wxStream_EOF; // TODO
+ if (m_file->Error())
+ m_lasterror = wxStream_WRITE_ERR;
+ else
+ m_lasterror = wxStream_NOERROR;
return ret;
}
m_file->Flush();
}
-size_t wxFileOutputStream::StreamSize() const
+size_t wxFileOutputStream::GetSize() const
{
return m_file->Length();
}
#endif
// wxUSE_STREAMS && wxUSE_FILE
+