Files
core/Common/cppcf/stream.cpp
Ivan Morozov 8f74b9362a Revert "test NSFile::CFileBinary as Stream"
This reverts commit 54261fd1a1.
2022-08-01 19:41:46 +03:00

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;
}