File Length
Calculates the length of a binary file.
Controller: CodeCogs
Contents
Interface
C++
FileLength
longfileLength( | FILE* | stream | ) |
Example 1
#include <stdio.h> #include <codecogs/computing/io/binary/file_length.h> using namespace Computing::IO::Binary; int main () { FILE* stream = fopen("/codecogs/io/binary/file_length.h","rb"); printf("\n File length=%d", fileLength(stream)); fclose(stream); return 0; }
Parameters
stream A pointer to the file stream
Returns
- The length of the file in bytes. Return -1 if an error is encountered.
Authors
- Will Bateman (March 2005)
Source Code
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.