#include <io.h>
bool isLive(const char* name)
{
return name && _access(name,0)==0;
}
#include <windows.h>
bool isDir(const char* dir)
{
HANDLE h;
WIN32_FIND_DATA info;
bool res = false;
if (dir
&& (h=FindFirstFile(dir,&info)) != INVALID_HANDLE_VALUE
&& (info.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY))
{
res = true;
FindClose(h);
}
return res;
}