Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

static size_t fsize ( FILE *  pFile  )  [static]

File size.

Returns:
file size in bytes.

0 on failure.

Parameters:
pFile File to size.

Definition at line 39 of file bin2c.c.

{
    long    cbFile;
    off_t   Pos = ftell(pFile);
    if (    Pos >= 0
        &&  !fseek(pFile, 0, SEEK_END))
    {
        cbFile = ftell(pFile);
        if (    cbFile >= 0
            &&  !fseek(pFile, 0, SEEK_SET))
            return cbFile;
    }
    return 0;
}


Generated by  Doxygen 1.6.0   Back to index