-#if 0
-bool wxDirExists(const wxString& dir)
-{
-#ifdef __VMS__
- return FALSE;
-#elif !defined(__WXMSW__)
- struct stat sbuf;
- return (stat(dir.fn_str(), &sbuf) != -1) && S_ISDIR(sbuf.st_mode) ? TRUE : FALSE;
-#else
-
- /* MATTHEW: [6] Always use same code for Win32, call FindClose */
-#if defined(__WIN32__)
- WIN32_FIND_DATA fileInfo;
-#else
-#ifdef __BORLANDC__
- struct ffblk fileInfo;
-#else
- struct find_t fileInfo;
-#endif
-#endif
-
-#if defined(__WIN32__)
- HANDLE h = FindFirstFile((LPTSTR) WXSTRINGCAST dir,(LPWIN32_FIND_DATA)&fileInfo);
-
- if (h==INVALID_HANDLE_VALUE)
- return FALSE;
- else {
- FindClose(h);
- return ((fileInfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY);
- }
-#else
- // In Borland findfirst has a different argument
- // ordering from _dos_findfirst. But _dos_findfirst
- // _should_ be ok in both MS and Borland... why not?
-#ifdef __BORLANDC__
- return ((findfirst(WXSTRINGCAST dir, &fileInfo, _A_SUBDIR) == 0 && (fileInfo.ff_attrib & _A_SUBDIR) != 0));
-#else
- return (((_dos_findfirst(WXSTRINGCAST dir, _A_SUBDIR, &fileInfo) == 0) && (fileInfo.attrib & _A_SUBDIR)) != 0);
-#endif
-#endif
-
-#endif
-}
-
-#endif
-