Function getRemainingStreamSize

Synopsis

#include <Source/Falcor/Utils/BinaryFileStream.h>

uint32_t getRemainingStreamSize()

Description

Calculates amount of remaining data in the file.

Return
Number of bytes remaining in the stream

Source

Lines 110-117 in Source/Falcor/Utils/BinaryFileStream.h.

uint32_t getRemainingStreamSize()
{    
    std::streamoff currentPos = mStream.tellg();
    mStream.seekg(0, mStream.end);
    std::streamoff length = mStream.tellg();
    mStream.seekg(currentPos);
    return (uint32_t)(length - currentPos); 
}





Add Discussion as Guest

Log in to DocsForge