X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80fdcdb90ef779185492dab676d461fc34933312..661698e54f2bc599dc1a961ffbae08ccdd6b9b97:/include/wx/file.h diff --git a/include/wx/file.h b/include/wx/file.h index 044e891fa8..3f5963185e 100644 --- a/include/wx/file.h +++ b/include/wx/file.h @@ -19,7 +19,7 @@ #include "wx/string.h" #include "wx/filefn.h" -#include "wx/strconv.h" +#include "wx/convauto.h" // ---------------------------------------------------------------------------- // class wxFile: raw file IO @@ -70,12 +70,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();