#pragma interface "file.h"
#endif
-// ----------------------------------------------------------------------------
-// simple types
-// ----------------------------------------------------------------------------
-
#include "wx/string.h"
#include "wx/filefn.h"
-#include "wx/stream.h" // for wxSeekMode
-
-// define off_t
-#include <sys/types.h>
-
-#ifdef _MSC_VER
- #define off_t _off_t
-#endif
// ----------------------------------------------------------------------------
// constants
// returns true on success
uint Write(const void *pBuf, uint nCount);
// returns true on success
- bool Write(const wxString& str) { return Write(str.c_str(), str.Len()); }
+ bool Write(const wxString& s) { return Write(s.c_str(), s.Len()) != 0; }
// flush data not yet written
bool Flush();
bool IsOpened() const { return m_file.IsOpened(); }
// I/O (both functions return true on success, false on failure)
- bool Write(const void *p, uint n) { return m_file.Write(p, n); }
- bool Write(const wxString& str) { return m_file.Write(str); }
+ bool Write(const void *p, uint n) { return m_file.Write(p, n) != 0; }
+ bool Write(const wxString& str) { return m_file.Write(str); }
// different ways to close the file
// validate changes and delete the old file of name m_strName
};
#endif
- // __FILEH__
+ // __FILEH__
// Created: 29/01/98
// RCS-ID: $Id$
// Copyright: (c) 1998 Julian Smart
-// Licence: wxWindows license
+// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef __FILEFNH__
#pragma interface "filefn.h"
#endif
-#include "wx/list.h"
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+// define off_t
+#include <sys/types.h>
+
+#ifdef _MSC_VER
+ #define off_t _off_t
+#endif
+
+typedef enum {
+ wxFromStart,
+ wxFromCurrent,
+ wxFromEnd
+} wxSeekMode;
+
+// ----------------------------------------------------------------------------
+// functions
+// ----------------------------------------------------------------------------
bool WXDLLEXPORT wxFileExists(const wxString& filename);
#define FileExists wxFileExists
// find a file in a list of directories, returns false if not found
bool WXDLLEXPORT wxFindFileInPath(wxString *pStr, const char *pszPath, const char *pszFile);
+// ----------------------------------------------------------------------------
+// classes
+// ----------------------------------------------------------------------------
+
// Path searching
class WXDLLEXPORT wxPathList: public wxStringList
{
#endif
#include <stdio.h>
-#include <wx/object.h>
-#include <wx/string.h>
-
-#ifdef _MSC_VER
- #define off_t _off_t
-#endif
+#include "wx/object.h"
+#include "wx/string.h"
+#include "wx/filefn.h" // for off_t and wxSeekMode
/*
* wxStream: base classes
*/
-
-typedef enum {
- wxFromStart, wxFromCurrent, wxFromEnd
-} wxSeekMode;
-
class wxOutputStream;
class wxInputStream: virtual public wxObject {
DECLARE_ABSTRACT_CLASS(wxInputStream)