Remove identic implementations of wxDir::Exists from platform-specific files and put it in dircmn.cpp (they all used wxDirExists).
Add wxDir::Make() and wxDir::Remove() for coherency with wxDir::Exists() and document them as simple aliases to wxFileName functions, just a bit more readable. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -83,8 +83,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
|
||||
// -----
|
||||
@@ -106,6 +104,7 @@ public:
|
||||
|
||||
// get the full name of the directory (without '/' at the end)
|
||||
wxString GetName() const;
|
||||
|
||||
|
||||
// file enumeration routines
|
||||
// -------------------------
|
||||
@@ -151,6 +150,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;
|
||||
|
||||
|
Reference in New Issue
Block a user