mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 14:00:32 +08:00
16 lines
270 B
C++
16 lines
270 B
C++
#include "stream.h"
|
|
|
|
|
|
std::streamsize CFCPP::Length(const CFCPP::Stream& st)
|
|
{
|
|
if (st.get() == nullptr)
|
|
return 0;
|
|
|
|
auto curPos = st->tellg();
|
|
st->seekg(0, std::ios_base::end);
|
|
auto ssize = st->tellg();
|
|
st->seekg(curPos);
|
|
|
|
return ssize;
|
|
}
|