]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wfstream.cpp
Added GSocket_Init and GSocket_Cleanup
[wxWidgets.git] / src / common / wfstream.cpp
index 599c2f2fad493e41c3291d6f4b14d2d08a305554..3bf2a080ba94475c276ecf48a4cc75f26b218427 100644 (file)
@@ -67,7 +67,7 @@ char wxFileInputStream::Peek()
   return 0;
 }
 
-size_t wxFileInputStream::StreamSize() const
+size_t wxFileInputStream::GetSize() const
 {
   return m_file->Length();
 }
@@ -138,7 +138,10 @@ wxFileOutputStream::~wxFileOutputStream()
 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;
 }
 
@@ -158,7 +161,7 @@ void wxFileOutputStream::Sync()
   m_file->Flush();
 }
 
-size_t wxFileOutputStream::StreamSize() const
+size_t wxFileOutputStream::GetSize() const
 {
   return m_file->Length();
 }