bool FileIO::CheckFileExists ( CString path )
{
WIN32_FIND_DATA data;
HANDLE hFile = FindFirstFile( path, &data );
if ( hFile == INVALID_HANDLE_VALUE ) // directory doesn't exist
return (FALSE);
else
{
// is it folder or file?
FindClose(hFile);
if ( data.dwFileAttributes ) return ( true );
}
return ( false );
}