Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>filelength</b> http://www.ousob.com [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
filelength
==========

Syntax
------

     #include <io.h>
     
     long filelength(int fhandle);

Description
-----------

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 fopen: or freopen:, you can use fileno: macro.         

Return Value
------------

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.

Example
-------

       printf("Size of file to which STDIN is redirected is %ld\n",
               filelength(0));


See Also: fopen freopen fileno

Online resources provided by: http://www.ousob.com --- NG 2 HTML conversion by Dave Pearson