The f_eof function tests for end-of-file on a file.
int f_eof (
FIL* FileObject /* File object */
);
The f_eof function returns a non-zero value if the read/write pointer has reached end of the file; otherwise it returns a zero.
In this revision, the f_eof function is implemented as a macro.
#define f_eof(fp) (((fp)->fptr) == ((fp)->fsize) ? 1 : 0)
Always available.