From 16ca2afc73e6c856d3ed0d4a6be64632fd8f92c3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 12 Oct 2002 22:19:26 +0000 Subject: [PATCH] only define Foo equivalents for wxFoo file functions if WXWIN_COMPATIBILITY_2 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/filefn.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/include/wx/filefn.h b/include/wx/filefn.h index 45e3648086..b6d2f0087f 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -150,34 +150,25 @@ WXDLLEXPORT int wxOpen( const wxChar *pathname, int flags, mode_t mode ); // functions // ---------------------------------------------------------------------------- WXDLLEXPORT bool wxFileExists(const wxString& filename); -#define FileExists wxFileExists // does the path exist? (may have or not '/' or '\\' at the end) WXDLLEXPORT bool wxPathExists(const wxChar *pszPathName); -#define wxDirExists wxPathExists -#define DirExists wxDirExists - WXDLLEXPORT bool wxIsAbsolutePath(const wxString& filename); -#define IsAbsolutePath wxIsAbsolutePath // Get filename WXDLLEXPORT wxChar* wxFileNameFromPath(wxChar *path); WXDLLEXPORT wxString wxFileNameFromPath(const wxString& path); -#define FileNameFromPath wxFileNameFromPath // Get directory WXDLLEXPORT wxString wxPathOnly(const wxString& path); -#define PathOnly wxPathOnly // wxString version WXDLLEXPORT wxString wxRealPath(const wxString& path); WXDLLEXPORT void wxDos2UnixFilename(wxChar *s); -#define Dos2UnixFilename wxDos2UnixFilename WXDLLEXPORT void wxUnix2DosFilename(wxChar *s); -#define Unix2DosFilename wxUnix2DosFilename // Strip the extension, in situ WXDLLEXPORT void wxStripExtension(wxChar *buffer); @@ -251,6 +242,19 @@ WXDLLEXPORT bool wxMkdir(const wxString& dir, int perm = 0777); // Remove directory. Flags reserved for future use. WXDLLEXPORT bool wxRmdir(const wxString& dir, int flags = 0); +// compatibility defines, don't use in new code +#define wxDirExists wxPathExists + +#if WXWIN_COMPATIBILITY_2 + #define FileExists wxFileExists + #define DirExists wxDirExists + #define IsAbsolutePath wxIsAbsolutePath + #define FileNameFromPath wxFileNameFromPath + #define PathOnly wxPathOnly + #define Dos2UnixFilename wxDos2UnixFilename + #define Unix2DosFilename wxUnix2DosFilename +#endif + // ---------------------------------------------------------------------------- // separators in file names // ----------------------------------------------------------------------------