SilverScreen Solid Modeler

filelength

filelength

Previous topic Next topic  

filelength

Previous topic Next topic JavaScript is required for the print function  

StandardCLibrary

 

long filelength( FILE *fp, char *filepath )

 

FILE *fp;            /* a stream pointer */

char *filepath;      /* file path */

 

 




Synopsis

#include "stdio.h"

 

The filelength function returns the length in bytes of a file. If fp is non-NULL, then filelength determines the length of the file referred to by fp ; otherwise, filelength determines the length of the file whose name is given by filepath .

 

 

Parameters

fp is an open stream, or NULL. filepath is the name of a file on disk, or NULL.

 

 

Return Value

filelength returns the size in bytes of the indicated file.

 

 

Comments

If you wish to know the size of an open file, use filelength as follows:

 

 

 filelength( fp, NULL );

 

 

If the file is not open, use filelength as follows:

 

 

 filelength( NULL, "\\some\\file\\name" );