\membersection{::wxDirExists}\label{functionwxdirexists}
-\func{bool}{wxDirExists}{\param{const wxChar *}{dirname}}
+\func{bool}{wxDirExists}{\param{const wxString\& }{dirname}}
Returns true if \arg{dirname} exists and is a directory.
WXDLLIMPEXP_BASE bool wxFileExists(const wxString& filename);
// does the path exist? (may have or not '/' or '\\' at the end)
-WXDLLIMPEXP_BASE bool wxDirExists(const wxChar *pszPathName);
+WXDLLIMPEXP_BASE bool wxDirExists(const wxString& pathName);
WXDLLIMPEXP_BASE bool wxIsAbsolutePath(const wxString& filename);
}
// does the path exists? (may have or not '/' or '\\' at the end)
-bool wxDirExists(const wxChar *pszPathName)
+bool wxDirExists(const wxString& pathName)
{
- wxString strPath(pszPathName);
+ wxString strPath(pathName);
#if defined(__WINDOWS__) || defined(__OS2__)
// Windows fails to find directory named "c:\dir\" even if "c:\dir" exists,
return wxStat(strPath.c_str(), &st) == 0 && ((st.st_mode & S_IFMT) == S_IFDIR);
#else
// S_IFMT not supported in VA compilers.. st_mode is a 2byte value only
- return wxStat(pszPathName, &st) == 0 && (st.st_mode == S_IFDIR);
+ return wxStat(strPath.c_str(), &st) == 0 && (st.st_mode == S_IFDIR);
#endif
#endif // __WIN32__/!__WIN32__