Have a look at the file() function - it should help you

Cheers,

RyanJ