#endif // PCH
#include "wx/dir.h"
-#include "wx/filefn.h" // for wxDirExists()
#include "pfall.h"
// throw away the trailing slashes
size_t n = m_dirname.length();
- wxCHECK_RET( n, _T("empty dir name in wxDir") );
+ wxCHECK_RET( n, wxT("empty dir name in wxDir") );
while ( n > 0 && m_dirname[--n] == '/' )
;
{
if ( svfs_dir_endfind (m_dir) != 0 )
{
- wxLogLastError(_T("svfs_dir_endfind"));
+ wxLogLastError(wxT("svfs_dir_endfind"));
}
m_dir = NULL;
}
// speed up string concatenation in the loop a bit
wxString path = m_dirname;
- path += _T('/');
+ path += wxT('/');
path.reserve(path.length() + 255);
wxString de_d_name;
return true;
}
-// ----------------------------------------------------------------------------
-// wxDir helpers
-// ----------------------------------------------------------------------------
-
-/* static */
-bool wxDir::Exists(const wxString& dir)
-{
- return wxDirExists(dir);
-}
-
// ----------------------------------------------------------------------------
// wxDir construction/destruction
// ----------------------------------------------------------------------------
if ( m_data )
{
name = M_DIR->GetName();
- if ( !name.empty() && (name.Last() == _T('/')) )
+ if ( !name.empty() && (name.Last() == wxT('/')) )
{
// chop off the last (back)slash
name.Truncate(name.length() - 1);
const wxString& filespec,
int flags) const
{
- wxCHECK_MSG( IsOpened(), false, _T("must wxDir::Open() first") );
+ wxCHECK_MSG( IsOpened(), false, wxT("must wxDir::Open() first") );
M_DIR->Close();
M_DIR->SetFileSpec(filespec);
M_DIR->SetFlags(flags);
bool wxDir::GetNext(wxString *filename) const
{
- wxCHECK_MSG( IsOpened(), false, _T("must wxDir::Open() first") );
- wxCHECK_MSG( filename, false, _T("bad pointer in wxDir::GetNext()") );
+ wxCHECK_MSG( IsOpened(), false, wxT("must wxDir::Open() first") );
+ wxCHECK_MSG( filename, false, wxT("bad pointer in wxDir::GetNext()") );
return M_DIR->Read(filename);
}