X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0c133e13b36a923c65f94499554e432bc3a0daa..cb9582cdf67f189bc4ba6d5f43bb09722c4c5995:/include/wx/dir.h?ds=inline

diff --git a/include/wx/dir.h b/include/wx/dir.h
index b7389f1708..94c5d453c0 100644
--- a/include/wx/dir.h
+++ b/include/wx/dir.h
@@ -14,6 +14,7 @@
 
 #include "wx/longlong.h"
 #include "wx/string.h"
+#include "wx/filefn.h"      // for wxS_DIR_DEFAULT
 
 class WXDLLIMPEXP_FWD_BASE wxArrayString;
 
@@ -23,7 +24,7 @@ class WXDLLIMPEXP_FWD_BASE wxArrayString;
 
 // these flags define what kind of filenames is included in the list of files
 // enumerated by GetFirst/GetNext
-enum
+enum wxDirFlags
 {
     wxDIR_FILES     = 0x0001,       // include files
     wxDIR_DIRS      = 0x0002,       // include directories
@@ -83,8 +84,6 @@ class WXDLLIMPEXP_FWD_BASE wxDirData;
 class WXDLLIMPEXP_BASE wxDir
 {
 public:
-    // test for existence of a directory with the given name
-    static bool Exists(const wxString& dir);
 
     // ctors
     // -----
@@ -107,6 +106,7 @@ public:
     // get the full name of the directory (without '/' at the end)
     wxString GetName() const;
 
+
     // file enumeration routines
     // -------------------------
 
@@ -151,6 +151,20 @@ public:
     static wxULongLong GetTotalSize(const wxString &dir, wxArrayString *filesSkipped = NULL);
 #endif // wxUSE_LONGLONG
 
+
+    // static utilities for directory management
+    // (alias to wxFileName's functions for dirs)
+    // -----------------------------------------
+
+    // test for existence of a directory with the given name
+    static bool Exists(const wxString& dir);
+
+    static bool Make(const wxString &dir, int perm = wxS_DIR_DEFAULT,
+                     int flags = 0);
+
+    static bool Remove(const wxString &dir, int flags = 0);
+
+
 private:
     friend class wxDirData;