Enhanced directory detection in a way we don't actually need yet

This commit is contained in:
ridiculousfish
2012-02-17 18:08:08 -08:00
parent ac0b97a571
commit 1bedc16544
4 changed files with 19 additions and 14 deletions

View File

@@ -82,13 +82,15 @@ void wutil_destroy()
{
}
std::wstring *wreaddir(DIR *dir, std::wstring &outPath)
bool wreaddir(DIR *dir, std::wstring &outPath, bool *is_dir)
{
struct dirent *d = readdir( dir );
if ( !d ) return 0;
if ( !d ) return false;
outPath = str2wcstring(d->d_name);
return &outPath;
if (is_dir)
*is_dir = (d->d_type == DT_DIR);
return true;
}