filelength

Returns the number of bytes in an open file

Local Servers:blocking
Remote Servers:blocking
Platform:NLM
Service:Operating System I/O

Syntax

  #include <nwfileio.h> 
    
  LONG filelength  (  
     int   fildes);
  

Parameters

handle
(IN) Specifies a file handle.

Return Values

filelength returns a value of -1 if an error occurs.

If an error occurs, errno can be set to:

4

EBADF

Bad file number.

If filelength does not complete successfully, NetWareErrno is set.

Remarks

The filelength function returns the number of bytes in the opened file indicated by the file handle.

See Also

dup, dup2, eof, lseek, tell

Example

  #include <fcntl.h>  
   
  LONG   length;  
  int    handle;  
  length = filelength (handle);