X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/717b9bf234a20c491e0c9ee8f2c1bffad56a59c5..2ef31e80ee0e9c597ffca0fd7a0eb9d018a2f51b:/src/common/textfile.cpp?ds=sidebyside diff --git a/src/common/textfile.cpp b/src/common/textfile.cpp index 174cde4d30..5c74b3ab57 100644 --- a/src/common/textfile.cpp +++ b/src/common/textfile.cpp @@ -64,13 +64,13 @@ const wxChar *wxTextFile::GetEOL(wxTextFileType type) { switch ( type ) { default: - wxFAIL_MSG(_T("bad file type in wxTextFile::GetEOL.")); + wxFAIL_MSG(wxT("bad file type in wxTextFile::GetEOL.")); // fall through nevertheless - we must return something... - case wxTextFileType_None: return _T(""); - case wxTextFileType_Unix: return _T("\n"); - case wxTextFileType_Dos: return _T("\r\n"); - case wxTextFileType_Mac: return _T("\r"); + case wxTextFileType_None: return wxT(""); + case wxTextFileType_Unix: return wxT("\n"); + case wxTextFileType_Dos: return wxT("\r\n"); + case wxTextFileType_Mac: return wxT("\r"); } } @@ -145,6 +145,11 @@ wxTextFile::~wxTextFile() // file operations // ---------------------------------------------------------------------------- +bool wxTextFile::Exists() const +{ + return wxFile::Exists(m_strFile); +} + bool wxTextFile::Open(const wxString& strFile) { m_strFile = strFile;