bool FolderExists(const KString& FolderName) { if(FolderName.IsEmpty()) return false; TCHAR CurDir[1024]; _tgetcwd(CurDir, sizeof(CurDir) - 1); const bool bResult = _tchdir(UnslashedFolderName(FolderName)) ? false : true; _tchdir(CurDir); return bResult; }
bool FileExists(const KString& FileName) { if(FileName.IsEmpty()) return false; FILE *file = _tfopen(FileName,TEXT("rb")); if(file) { fclose(file); return true; } return false; }