file_exists

(FW >= 1.0)

file_exists - check if a file exists

Description

int file_exists(string filename)
This will return a 1 if the file exists, otherwise it returns 0

Parameters

filename

full path and file name to check

size

option limit to the number of bytes returned

Return Value

returns 1 if the file exists

Examples

<pre><?
if (file_exists("/test.txt")) {
$f=fopen("/test.txt","r");
fclose($f);
} else print("File does not exist!");
?>
</pre>