]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dircmn.cpp
don't try to remove -g flag from CFLAGS, it is not necessary and doesn't work correct...
[wxWidgets.git] / src / common / dircmn.cpp
index 2fa41e06da709fa6bf61a508e6a451aae3abda39..074cd75f9e957a4eb175f9caea118a646158fe85 100644 (file)
 // implementation
 // ============================================================================
 
+// ----------------------------------------------------------------------------
+// wxDir::HasFiles() and HasSubDirs()
+// ----------------------------------------------------------------------------
+
+// dumb generic implementation
+
+bool wxDir::HasFiles(const wxString& spec)
+{
+    wxString s;
+    return GetFirst(&s, spec, wxDIR_FILES | wxDIR_HIDDEN);
+}
+
+// we have a (much) faster version for Unix
+// MBN: Cygwin should use the Unix version, but with the current build sistem
+//      this is painful
+#if defined(__CYGWIN__) || !defined(__UNIX_LIKE__) || defined(__WXMAC__)
+
+bool wxDir::HasSubDirs(const wxString& spec)
+{
+    wxString s;
+    return GetFirst(&s, spec, wxDIR_DIRS | wxDIR_HIDDEN);
+}
+
+#endif // !Unix
+
 // ----------------------------------------------------------------------------
 // wxDir::Traverse()
 // ----------------------------------------------------------------------------