#pragma hdrstop
#endif
+// For _A_SUBDIR, etc.
+#if defined(__BORLANDC__) && defined(__WIN16__)
+#include <dos.h>
+#endif
+
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
void Rewind();
bool Read(wxString *filename);
+ const wxString& GetName() const { return m_dirname; }
+
private:
FIND_DATA m_finddata;
return m_data != NULL;
}
+wxString wxDir::GetName() const
+{
+ wxString name;
+ if ( m_data )
+ {
+ name = M_DIR->GetName();
+ if ( !name.empty() )
+ {
+ // bring to canonical Windows form
+ name.Replace(_T("/"), _T("\\"));
+
+ if ( name.Last() == _T('\\') )
+ {
+ // chop off the last (back)slash
+ name.Truncate(name.length() - 1);
+ }
+ }
+ }
+
+ return name;
+}
+
wxDir::~wxDir()
{
delete M_DIR;