Use wxFile for IO if wxFFile is not available.
Closes #11067. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2235,7 +2235,11 @@ void wxFileHistory::AddFilesToMenu(wxMenu* menu)
|
|||||||
|
|
||||||
bool wxTransferFileToStream(const wxString& filename, wxSTD ostream& stream)
|
bool wxTransferFileToStream(const wxString& filename, wxSTD ostream& stream)
|
||||||
{
|
{
|
||||||
|
#if wxUSE_FFILE
|
||||||
wxFFile file(filename, wxT("rb"));
|
wxFFile file(filename, wxT("rb"));
|
||||||
|
#elif wxUSE_FILE
|
||||||
|
wxFile file(filename, wxFile::read);
|
||||||
|
#endif
|
||||||
if ( !file.IsOpened() )
|
if ( !file.IsOpened() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -2259,7 +2263,11 @@ bool wxTransferFileToStream(const wxString& filename, wxSTD ostream& stream)
|
|||||||
|
|
||||||
bool wxTransferStreamToFile(wxSTD istream& stream, const wxString& filename)
|
bool wxTransferStreamToFile(wxSTD istream& stream, const wxString& filename)
|
||||||
{
|
{
|
||||||
|
#if wxUSE_FFILE
|
||||||
wxFFile file(filename, wxT("wb"));
|
wxFFile file(filename, wxT("wb"));
|
||||||
|
#elif wxUSE_FILE
|
||||||
|
wxFile file(filename, wxFile::write);
|
||||||
|
#endif
|
||||||
if ( !file.IsOpened() )
|
if ( !file.IsOpened() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -2282,7 +2290,11 @@ bool wxTransferStreamToFile(wxSTD istream& stream, const wxString& filename)
|
|||||||
|
|
||||||
bool wxTransferFileToStream(const wxString& filename, wxOutputStream& stream)
|
bool wxTransferFileToStream(const wxString& filename, wxOutputStream& stream)
|
||||||
{
|
{
|
||||||
|
#if wxUSE_FFILE
|
||||||
wxFFile file(filename, wxT("rb"));
|
wxFFile file(filename, wxT("rb"));
|
||||||
|
#elif wxUSE_FILE
|
||||||
|
wxFile file(filename, wxFile::read);
|
||||||
|
#endif
|
||||||
if ( !file.IsOpened() )
|
if ( !file.IsOpened() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -2306,7 +2318,11 @@ bool wxTransferFileToStream(const wxString& filename, wxOutputStream& stream)
|
|||||||
|
|
||||||
bool wxTransferStreamToFile(wxInputStream& stream, const wxString& filename)
|
bool wxTransferStreamToFile(wxInputStream& stream, const wxString& filename)
|
||||||
{
|
{
|
||||||
|
#if wxUSE_FFILE
|
||||||
wxFFile file(filename, wxT("wb"));
|
wxFFile file(filename, wxT("wb"));
|
||||||
|
#elif wxUSE_FILE
|
||||||
|
wxFile file(filename, wxFile::write);
|
||||||
|
#endif
|
||||||
if ( !file.IsOpened() )
|
if ( !file.IsOpened() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user