| www.delorie.com/djgpp/doc/libc-2.01/libc_271.html | search |
#include <io.h> long filelength(int fhandle);
This function returns the size, in bytes, of a file whose handle is specified in the argument fhandle. To get the handle of a file opened by section fopen or section freopen, you can use section fileno macro.
The size of the file in bytes, or (if any error occured) -1L and errno set to a value describing the cause of the failure.
printf("Size of file to which STDIN is redirected is %ld\n",
filelength(0));
Go to the first, previous, next, last section, table of contents.
| prev next webmaster | delorie software privacy |
| Copyright © 1997 | Updated Apr 1997 |