fexist

warning

This function starts with lowercase letter.

Description

Checks if a specific file exists in the scriptfiles directory.

NameDescription
pattern[]The name of the file, optionally containing wild-cards
characters.

Returns

The number of files that match the pattern.

Examples

// Check, if "file.txt" exists
if (fexist("file.txt"))
{
// Success
// Print the success
print("\"file.txt\" exists.");
}
else
{
// Error
print("\"file.txt\" does not exist.");
}

Related Functions