]> git.saurik.com Git - wxWidgets.git/commitdiff
make wxDir::Has{Files,SubDirs}() const
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 22 Apr 2008 16:29:43 +0000 (16:29 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 22 Apr 2008 16:29:43 +0000 (16:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/dir.h
interface/dir.h
src/common/dircmn.cpp
src/unix/dir.cpp

index 99b7b4acf19295409c7de0fc1a7b2ee9c30dbad7..9a73c6644e0e85258388f98a9f2eff19c98aa8c9 100644 (file)
@@ -120,10 +120,10 @@ public:
     bool GetNext(wxString *filename) const;
 
     // return true if this directory has any files in it
-    bool HasFiles(const wxString& spec = wxEmptyString);
+    bool HasFiles(const wxString& spec = wxEmptyString) const;
 
     // return true if this directory has any subdirectories
-    bool HasSubDirs(const wxString& spec = wxEmptyString);
+    bool HasSubDirs(const wxString& spec = wxEmptyString) const;
 
     // enumerate all files in this directory and its subdirectories
     //
index 4e65800c5253b3aae153c1a406a13928c4804e67..82b40531ca43c7194d7c3673fd4128993831d0ca 100644 (file)
@@ -244,14 +244,14 @@ public:
         @a filespec. If @a filespec is empty, look for any files at all. In any
         case, even hidden files are taken into account.
     */
-    bool HasFiles(const wxString& filespec = wxEmptyString);
+    bool HasFiles(const wxString& filespec = wxEmptyString) const;
 
     /**
         Returns @true if the directory contains any subdirectories (if a non
         empty @a filespec is given, only check for directories matching it).
         The hidden subdirectories are taken into account as well.
     */
-    bool HasSubDirs(const wxString& dirspec = wxEmptyString);
+    bool HasSubDirs(const wxString& dirspec = wxEmptyString) const;
 
     /**
         Returns @true if the directory was successfully opened by a previous
index 30e47dd78284e7914c506581b74d3fa33be52965..6154cb60a1bd804290d45aa059f767fe079d1caa 100644 (file)
@@ -55,7 +55,7 @@ wxDirTraverser::OnOpenError(const wxString& WXUNUSED(dirname))
 
 // dumb generic implementation
 
-bool wxDir::HasFiles(const wxString& spec)
+bool wxDir::HasFiles(const wxString& spec) const
 {
     wxString s;
     return GetFirst(&s, spec, wxDIR_FILES | wxDIR_HIDDEN);
@@ -64,7 +64,7 @@ bool wxDir::HasFiles(const wxString& spec)
 // we have a (much) faster version for Unix
 #if (defined(__CYGWIN__) && defined(__WINDOWS__)) || !defined(__UNIX_LIKE__) || defined(__WXMAC__) || defined(__EMX__) || defined(__WINE__)
 
-bool wxDir::HasSubDirs(const wxString& spec)
+bool wxDir::HasSubDirs(const wxString& spec) const
 {
     wxString s;
     return GetFirst(&s, spec, wxDIR_DIRS | wxDIR_HIDDEN);
index 7743d9b064d822e9e2a4c3878b709712b249cde1..16f0b365032ae0528cefe4eb4c83f8c384f0de03 100644 (file)
@@ -290,7 +290,7 @@ bool wxDir::GetNext(wxString *filename) const
     return M_DIR->Read(filename);
 }
 
-bool wxDir::HasSubDirs(const wxString& spec)
+bool wxDir::HasSubDirs(const wxString& spec) const
 {
     wxCHECK_MSG( IsOpened(), false, _T("must wxDir::Open() first") );