Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - filesize http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   filesize

   Usage
   #include <io.h>
   long filesize(char *filename);

   Description
   filesize determines the size of a file in bytes. The filename must  be
   an existing file that is not currently open.

   Example
   #include <io.h>
   main()
   {
   long size;
        size = filesize ("file.dat");
        printf("The filesize of file.dat is %ld \n",size);
   }

   Return Value
   The length of the file in bytes is returned upon success, otherwise  a
   -1L is returned and errno is set.


See Also: stat fstat

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson