mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-15 05:38:50 +08:00
Revert "test NSFile::CFileBinary as Stream"
This reverts commit 54261fd1a1.
This commit is contained in:
15
Common/cppcf/stream.cpp
Normal file
15
Common/cppcf/stream.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user