Added wxFile::ReadAll() for consistency with wxFFile::ReadAll().
Make it possible to use wxFFile and wxFile interchangeably for simply reading the entire contents of the file as a string. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -372,6 +372,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.
|
||||
|
||||
|
Reference in New Issue
Block a user