eof
Determines if the end of the file has been reached for
a specified file
- Local Servers:nonblocking
- Remote Servers:nonblocking
- Classification:POSIX
- Platform:NLM
- Service:Operating System I/O
Syntax
#include <unistd.h>
int eof (
int handle);
Parameters
- handle
- (IN) Specifies a file handle.
Return Values
eof returns a value of 1 if the current file position is at
the end of the file. If the current file position is not at the
end, a value of 0 is returned. If an error is detected, a value
of -1 is returned.
If an error occurs, errno is set to:
If eof does not complete successfully, NetWareErrno is
set.
Remarks
The eof function determines if the end of the file has been
reached for the file whose file handle is given by handle.
Because the current file position is set following an input operation,
eof can be called to detect the end of the file before an input
operation beyond the end of the file is attempted.