X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/65fe93d8a500833e0acd3ff64161b85a204b8dbf..36a0190ebd5bd9a7302f60f6dcd608b80574e21c:/interface/wx/file.h?ds=sidebyside diff --git a/interface/wx/file.h b/interface/wx/file.h index f2cff5c32c..8eeab558c5 100644 --- a/interface/wx/file.h +++ b/interface/wx/file.h @@ -2,7 +2,6 @@ // Name: file.h // Purpose: interface of wxTempFile, wxFile // Author: wxWidgets team -// RCS-ID: $Id$ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -173,12 +172,12 @@ public: or test if it can be opened for writing with Access(). */ write, - /** Open file for reading and writing; can not be used with Access() */ + /** Open file for reading and writing; cannot be used with Access() */ read_write, /** Open file for appending: the file is opened for writing, but the old contents of the file are not erased and the file pointer is initially placed at the end - of the file; can not be used with Access(). + of the file; cannot be used with Access(). This is the same as OpenMode::write if the file doesn't exist. */ @@ -372,6 +371,23 @@ public: */ ssize_t Read(void* buffer, size_t count); + /** + Reads the entire contents of the file into a string. + + @param str + Non-@NULL pointer to a string to read data into. + @param conv + Conversion object to use in Unicode build; by default supposes + that file contents is encoded in UTF-8 but falls back to the + current locale encoding (or Latin-1 if it is UTF-8 too) if it is + not. + + @return @true if file was read successfully, @false otherwise. + + @since 2.9.5 + */ + bool ReadAll(wxString* str, const wxMBConv& conv = wxConvAuto()); + /** Seeks to the specified position.