X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce00f59b5b169752d2f05ce3bb1a88ddc1b38b4c..0bfd90b3e73c6df033d2ba09005a7b22fb42c161:/include/wx/dir.h diff --git a/include/wx/dir.h b/include/wx/dir.h index 94c5d453c0..83dab66454 100644 --- a/include/wx/dir.h +++ b/include/wx/dir.h @@ -94,18 +94,25 @@ public: // opens the directory for enumeration, use IsOpened() to test success wxDir(const wxString& dir); - // dtor cleans up the associated resources - ~wxDir(); + // dtor calls Close() automatically + ~wxDir() { Close(); } // open the directory for enumerating bool Open(const wxString& dir); + // close the directory, Open() can be called again later + void Close(); + // returns true if the directory was successfully opened bool IsOpened() const; // get the full name of the directory (without '/' at the end) wxString GetName() const; + // Same as GetName() but does include the trailing separator, unless the + // string is empty (only for invalid directories). + wxString GetNameWithSep() const; + // file enumeration routines // -------------------------