* @brief Checks whether a file exists at the given path * * @param Path the file path to check * @return BOOLEAN TRUE if the file exists, FALSE otherwise */
| 149 | * @return BOOLEAN TRUE if the file exists, FALSE otherwise |
| 150 | */ |
| 151 | BOOLEAN |
| 152 | FileExists(const char * Path) |
| 153 | { |
| 154 | DWORD Attr = GetFileAttributesA(Path); |
| 155 | |
| 156 | if (Attr == INVALID_FILE_ATTRIBUTES) |
| 157 | return FALSE; |
| 158 | |
| 159 | if (Attr & FILE_ATTRIBUTE_DIRECTORY) |
| 160 | return FALSE; |
| 161 | |
| 162 | return TRUE; |
| 163 | } |
| 164 | |
| 165 | /** |
| 166 | * @brief Reads and parses an include file into a buffer |