]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/corefoundation/stdpaths_cf.cpp
don't create non-existing groups in HasEntry()
[wxWidgets.git] / src / mac / corefoundation / stdpaths_cf.cpp
index eb6e0367bf9ed7446a13d9bd464d6a94a8a3beb9..d4068cc2fa448431fbb7329822eae81f1d84c18a 100644 (file)
@@ -31,6 +31,7 @@
 #include "wx/mac/private.h"
 #endif
 #include "wx/mac/corefoundation/cfstring.h"
+#include "wx/mac/private.h"
 
 #if defined(__DARWIN__)
 #include <CoreFoundation/CFBundle.h>
@@ -106,6 +107,24 @@ wxString wxStandardPathsCF::GetFromFunc(wxCFURLRef (*func)(wxCFBundleRef)) const
     return ret;
 }
 
+wxString wxStandardPathsCF::GetDocumentsDir() const
+{
+#ifdef __WXMAC__
+    return wxMacFindFolderNoSeparator
+        (
+#if TARGET_API_MAC_OSX
+        kUserDomain,
+#else
+        kOnSystemDisk,
+#endif
+        kDocumentsFolderType,
+        kCreateFolder
+        );
+#else
+    return wxFileName::GetHomeDir() + wxT("/Documents");
+#endif
+}
+
 // ----------------------------------------------------------------------------
 // wxStandardPathsCF public API
 // ----------------------------------------------------------------------------