MCPcopy Create free account
hub / github.com/beefytech/Beef / SetSizeFast

Method SetSizeFast

BeefySysLib/FileStream.cpp:214–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214void SysFileStream::SetSizeFast(int size)
215{
216 int curSize = GetSize();
217 if (size == curSize)
218 return;
219
220 int curPos = GetPos();
221 SetPos(size);
222 BfpFileResult result = BfpFileResult_Ok;
223 BfpFile_Truncate(mFile, &result);
224 SetPos(curPos);
225 return;
226}
227
228void SysFileStream::Seek(int pos)
229{

Callers 2

WriteBlockMethod · 0.80
LinkMethod · 0.80

Calls 2

GetSizeFunction · 0.85
BfpFile_TruncateFunction · 0.50

Tested by

no test coverage detected