FileExists Function

Checks if a file exists.

bool FileExists(const char[] path, bool use_valve_fs, const char[] valve_path_id)

Parameters

const char[] path

Path to the file.

bool use_valve_fs

If true, the Valve file system will be used instead. This can be used to find files existing in any of the Valve search paths, rather than solely files existing directly in the gamedir.

const char[] valve_path_id

If use_valve_fs, a search path from gameinfo or NULL_STRING for all search paths.

Return Value

True if the file exists, false otherwise.