X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/65fe93d8a500833e0acd3ff64161b85a204b8dbf..66c2bf7b1d9326fb650acfaae22ec50528cfbf7c:/include/wx/file.h?ds=sidebyside diff --git a/include/wx/file.h b/include/wx/file.h index 5b04b0d7a2..b2cd59eab0 100644 --- a/include/wx/file.h +++ b/include/wx/file.h @@ -1,11 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: file.h +// Name: wx/file.h // Purpose: wxFile - encapsulates low-level "file descriptor" // wxTempFile - safely replace the old file // Author: Vadim Zeitlin // Modified by: // Created: 29/01/98 -// RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -19,7 +18,7 @@ #include "wx/string.h" #include "wx/filefn.h" -#include "wx/strconv.h" +#include "wx/convauto.h" // ---------------------------------------------------------------------------- // class wxFile: raw file IO @@ -70,12 +69,14 @@ public: int fd() const { return m_fd; } // read/write (unbuffered) + // read all data from the file into a string (useful for text files) + bool ReadAll(wxString *str, const wxMBConv& conv = wxConvAuto()); // returns number of bytes read or wxInvalidOffset on error ssize_t Read(void *pBuf, size_t nCount); // returns the number of bytes written size_t Write(const void *pBuf, size_t nCount); // returns true on success - bool Write(const wxString& s, const wxMBConv& conv = wxMBConvUTF8()); + bool Write(const wxString& s, const wxMBConv& conv = wxConvAuto()); // flush data not yet written bool Flush();