MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / getSize

Method getSize

TheForceEngine/TFE_FileSystem/filestream-posix.cpp:191–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191size_t FileStream::getSize(void)
192{
193 if (!m_file && !m_archive)
194 return 0;
195
196 size_t filesize = 0;
197 if (m_file) {
198 seek(0, FileStream::ORIGIN_END);
199 filesize = getLoc();
200 seek(0, FileStream::ORIGIN_START);
201 } else {
202 filesize = m_archive->getFileLength();
203 }
204
205 return filesize;
206}
207
208bool FileStream::isOpen(void) const
209{

Callers 1

readContentsMethod · 0.45

Calls 1

getFileLengthMethod · 0.45

Tested by

no test coverage detected