X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/106dcc2ceaa47cb8cfbdac9e776ac7458e23a222..0cc1991e2a3ae8df8f716d5a9bf1a59e2a17d0b3:/include/wx/dir.h diff --git a/include/wx/dir.h b/include/wx/dir.h index 9a73c6644e..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,12 +151,26 @@ 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; wxDirData *m_data; - DECLARE_NO_COPY_CLASS(wxDir) + wxDECLARE_NO_COPY_CLASS(wxDir); }; #endif // _WX_DIR_H_