#endif // PCH
#include "wx/dir.h"
-#include "wx/filefn.h" // for wxPathExists()
+#include "wx/filefn.h" // for wxDirExists()
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
#include "wx/msw/private.h"
#endif
bool wxDirData::Read(wxString *filename)
{
- bool first = FALSE;
+ bool first = false;
WIN32_FIND_DATA finddata;
#define PTR_TO_FINDDATA (&finddata)
m_finddata = FindFirst(filespec, PTR_TO_FINDDATA);
- first = TRUE;
+ first = true;
}
if ( !IsFindDataOk(m_finddata) )
#endif // __WIN32__
//else: not an error, just no (such) files
- return FALSE;
+ return false;
}
const wxChar *name;
{
if ( first )
{
- first = FALSE;
+ first = false;
}
else
{
#endif // __WIN32__
//else: not an error, just no more (such) files
- return FALSE;
+ return false;
}
}
break;
}
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
/* static */
bool wxDir::Exists(const wxString& dir)
{
- return wxPathExists(dir);
+ return wxDirExists(dir);
}
// ----------------------------------------------------------------------------
delete M_DIR;
m_data = new wxDirData(dirname);
- return TRUE;
+ return true;
}
bool wxDir::IsOpened() const
const wxString& filespec,
int flags) const
{
- wxCHECK_MSG( IsOpened(), FALSE, _T("must wxDir::Open() first") );
+ wxCHECK_MSG( IsOpened(), false, _T("must wxDir::Open() first") );
M_DIR->Rewind();
bool wxDir::GetNext(wxString *filename) const
{
- wxCHECK_MSG( IsOpened(), FALSE, _T("must wxDir::Open() first") );
+ wxCHECK_MSG( IsOpened(), false, _T("must wxDir::Open() first") );
- wxCHECK_MSG( filename, FALSE, _T("bad pointer in wxDir::GetNext()") );
+ wxCHECK_MSG( filename, false, _T("bad pointer in wxDir::GetNext()") );
return M_DIR->Read(filename);
}
FIND_DATA fd = FindFirst(dirname, &fs);
if ( !IsFindDataOk(fd) )
{
- return FALSE;
+ return false;
}
*ftAccess = fs.ftLastAccessTime;
FindClose(fd);
- return TRUE;
+ return true;
}
#endif // __WIN32__