X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e8f3bf98d0ce324b7c4212ed4c60174110294c8c..b8737371e220ef1920e6a3d2aed88c4bc2b04daf:/interface/wx/dir.h diff --git a/interface/wx/dir.h b/interface/wx/dir.h index 2a435bf818..d1fb1d47a1 100644 --- a/interface/wx/dir.h +++ b/interface/wx/dir.h @@ -3,7 +3,7 @@ // Purpose: interface of wxDir and wxDirTraverser // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -104,6 +104,8 @@ enum wxDirFlags wxDIR_HIDDEN = 0x0004, ///< Includes hidden files. wxDIR_DOTDOT = 0x0008, ///< Includes "." and "..". + //! Combination of the @c wxDIR_FILES, @c wxDIR_DIRS, @c wxDIR_HIDDEN flags + //! defined above. wxDIR_DEFAULT = wxDIR_FILES | wxDIR_DIRS | wxDIR_HIDDEN }; @@ -195,6 +197,10 @@ public: would be unchanged and should include ::wxDIR_DIRS flag to recurse into subdirectories (both flags are included in the value by default). See ::wxDirFlags for the list of the possible flags. + + @return Returns the total number of files found while traversing + the directory @a dirname (i.e. the number of entries appended + to the @a files array). @see Traverse() */ @@ -260,12 +266,29 @@ public: */ bool IsOpened() const; + /** + Creates a directory. + + This is just an alias for wxFileName::Mkdir(); refer to that function + for more info. + */ + static bool Make(const wxString &dir, int perm = wxS_DIR_DEFAULT, + int flags = 0); + /** Open the directory for enumerating, returns @true on success or @false if an error occurred. */ bool Open(const wxString& dir); + /** + Removes a directory. + + This is just an alias for wxFileName::Rmdir(); refer to that function + for more info. + */ + static bool Remove(const wxString &dir, int flags = 0); + /** Enumerate all files and directories under the given directory recursively calling the element of the provided wxDirTraverser object @@ -277,7 +300,7 @@ public: given. See ::wxDirFlags for the list of the possible flags. - For each found directory, @ref wxDirTraverser::OnDir() "sink.OnDir()" + For each directory found, @ref wxDirTraverser::OnDir() "sink.OnDir()" is called and @ref wxDirTraverser::OnFile() "sink.OnFile()" is called for every file. Depending on the return value, the enumeration may continue or stop.