file_exists(STRING* name)

Checks if the file exists anywhere in the file buffers, the work folder, the folder path, or a WRS resource.

Parameters:

name - file name (STRING* or char*).

Returns:

1 if the file exists, otherwise 0.

Speed:

Slow

Example:

if (!file_exists("notthere.mdl"))
error("notthere.mdl not there!");

See also:

file_load, add_buffer, PATH

► latest version online