#include "wx/string.h"
#include "wx/log.h"
#include "wx/intl.h"
+ #include "wx/filefn.h"
#endif //WX_PRECOMP
#include "wx/dir.h"
// 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()
// ----------------------------------------------------------------------------