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:
Vadim Zeitlin
2009-08-05 17:24:16 +00:00
parent 2c181e9954
commit ce0822e1b9

View File

@@ -2235,7 +2235,11 @@ void wxFileHistory::AddFilesToMenu(wxMenu* menu)
bool wxTransferFileToStream(const wxString& filename, wxSTD ostream& stream)
{
#if wxUSE_FFILE
wxFFile file(filename, wxT("rb"));
#elif wxUSE_FILE
wxFile file(filename, wxFile::read);
#endif
if ( !file.IsOpened() )
return false;
@@ -2259,7 +2263,11 @@ bool wxTransferFileToStream(const wxString& filename, wxSTD ostream& stream)
bool wxTransferStreamToFile(wxSTD istream& stream, const wxString& filename)
{
#if wxUSE_FFILE
wxFFile file(filename, wxT("wb"));
#elif wxUSE_FILE
wxFile file(filename, wxFile::write);
#endif
if ( !file.IsOpened() )
return false;
@@ -2282,7 +2290,11 @@ bool wxTransferStreamToFile(wxSTD istream& stream, const wxString& filename)
bool wxTransferFileToStream(const wxString& filename, wxOutputStream& stream)
{
#if wxUSE_FFILE
wxFFile file(filename, wxT("rb"));
#elif wxUSE_FILE
wxFile file(filename, wxFile::read);
#endif
if ( !file.IsOpened() )
return false;
@@ -2306,7 +2318,11 @@ bool wxTransferFileToStream(const wxString& filename, wxOutputStream& stream)
bool wxTransferStreamToFile(wxInputStream& stream, const wxString& filename)
{
#if wxUSE_FFILE
wxFFile file(filename, wxT("wb"));
#elif wxUSE_FILE
wxFile file(filename, wxFile::write);
#endif
if ( !file.IsOpened() )
return false;