Checks if the file exists
| 163 | |
| 164 | // Checks if the file exists |
| 165 | ILboolean iFileExists(ILconst_string FileName) |
| 166 | { |
| 167 | #if (!defined(_UNICODE) || !defined(_WIN32)) |
| 168 | FILE *CheckFile = fopen(FileName, "rb"); |
| 169 | #else // Windows uses _wfopen instead. |
| 170 | FILE *CheckFile = _wfopen(FileName, L"rb"); |
| 171 | #endif//_UNICODE |
| 172 | |
| 173 | if (CheckFile) { |
| 174 | fclose(CheckFile); |
| 175 | return IL_TRUE; |
| 176 | } |
| 177 | return IL_FALSE; |
| 178 | } |
| 179 | |
| 180 | |
| 181 | // Last time I tried, MSVC++'s fgets() was really really screwy |
no outgoing calls
no test coverage detected