The IDL_FileEOF() function returns TRUE if the file specified by the Logical Unit Number unit is at EOF, and FALSE otherwise:
int IDL_FileEOF(int unit)
The Logical Unit Number (LUN) of the file in question.