BloombergLP::bdls::FdStreamBuf_FileHandler::getOffset

Return the on-disk size of the byte range [first, last)].

Synopsis

Declared in <bdls_fdstreambuf.h>

std::streamoff
getOffset(
    char* first,
    char* last) const;

Description

Return the number of bytes that the data in the range specified by [first, last)] will fill when written to the file descriptor. Note that on Unix, or for a binary file on Windows, this value will be last - first, but for on Windows in text mode, extra bytes are added when ` would be written to the file descriptor as r `.

Return Value

the on-disk byte count for the range [first, last)]

Parameters

NameDescription
firstbeginning of the character range
lastend of the character range (exclusive)