]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
Added wxGenericValidator & doc
[wxWidgets.git] / src / common / filefn.cpp
index 8207942f5e321bfa296b80cfd629c13846b8ccd3..59a9cd78f097a0bc4ef0072d88a8803cda6a735b 100644 (file)
@@ -1451,6 +1451,19 @@ bool wxSetWorkingDirectory(const wxString& d)
 #endif
 }
 
+// Get the OS directory if appropriate (such as the Windows directory).
+// On non-Windows platform, probably just return the empty string.
+wxString wxGetOSDirectory()
+{
+#ifdef __WINDOWS__
+    char buf[256];
+    GetWindowsDirectory(buf, 256);
+    return wxString(buf);
+#else
+    return wxEmptyString;
+#endif
+}
+
 bool wxEndsWithPathSeparator(const char *pszFileName)
 {
   size_t len = Strlen(pszFileName);