Returns whether a file exists at the given path and filename.The user may not have permission to view files in the given path.
In that case, false is returned even though the file may exist.Warning: This function is easy to misuse.
Keep in mind that other programs are running at the same time as your TMBASIC program.
Another program may create/delete the file in between the call to FileExists and the subsequent read or write of the file.
In computer programming this is called a time-of-check to time-of-use (TOCTOU) bug.It is better to try performing the file operation without checking for file existence. Then, catch any ERR_FILE_NOT_FOUND errors.
function FileExists(filePath as String) as Boolean