Can I verify a file exists before I LoadImage()?

BlitzMax Forums/BlitzMax Beginners Area/Can I verify a file exists before I LoadImage()?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

What about:

Trap
BackgroundImage = LoadImage("graphics\stage"+Level+".png") 
Catch E$
print "File access error"
End Trap


Otherwise I usually try ReadFile() and if it gives Null then the file doesn't exist.