diff --git a/include/wx/filename.h b/include/wx/filename.h index bdf955e064..c5edc822c4 100644 --- a/include/wx/filename.h +++ b/include/wx/filename.h @@ -316,11 +316,11 @@ public: #endif // wxUSE_FFILE // directory creation and removal. - bool Mkdir(int perm = wxS_DIR_DEFAULT, int flags = 0); + bool Mkdir(int perm = wxS_DIR_DEFAULT, int flags = 0) const; static bool Mkdir(const wxString &dir, int perm = wxS_DIR_DEFAULT, int flags = 0); - bool Rmdir(int flags = 0); + bool Rmdir(int flags = 0) const; static bool Rmdir(const wxString &dir, int flags = 0); // operations on the path diff --git a/interface/wx/filename.h b/interface/wx/filename.h index 72bf9273e8..4e1697c7b8 100644 --- a/interface/wx/filename.h +++ b/interface/wx/filename.h @@ -892,7 +892,7 @@ public: @return Returns @true if the directory was successfully created, @false otherwise. */ - bool Mkdir(int perm = wxS_DIR_DEFAULT, int flags = 0); + bool Mkdir(int perm = wxS_DIR_DEFAULT, int flags = 0) const; /** Creates a directory. @@ -1009,7 +1009,7 @@ public: @return Returns @true if the directory was successfully deleted, @false otherwise. */ - bool Rmdir(int flags = 0); + bool Rmdir(int flags = 0) const; /** Deletes the specified directory from the file system. diff --git a/src/common/filename.cpp b/src/common/filename.cpp index f16ae7127b..2f668ec457 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -1073,7 +1073,7 @@ wxString wxFileName::GetTempDir() return dir; } -bool wxFileName::Mkdir( int perm, int flags ) +bool wxFileName::Mkdir( int perm, int flags ) const { return wxFileName::Mkdir(GetPath(), perm, flags); } @@ -1117,7 +1117,7 @@ bool wxFileName::Mkdir( const wxString& dir, int perm, int flags ) return ::wxMkdir( dir, perm ); } -bool wxFileName::Rmdir(int flags) +bool wxFileName::Rmdir(int flags) const { return wxFileName::Rmdir( GetPath(), flags ); }