LibCore: Add InputFileStream::seek

As a file is able to seek(), InputFileStreams can delegate the seek()
easily. This allows for seeking to specific locations in the file.
This commit is contained in:
kleines Filmröllchen 2021-06-24 23:50:01 +02:00 committed by Ali Mohammad Pur
commit 463a645d37
Notes: sideshowbarker 2024-07-18 11:32:32 +09:00

View file

@ -63,6 +63,11 @@ public:
return true;
}
bool seek(size_t offset, SeekMode whence = SeekMode::SetPosition)
{
return m_file->seek(offset, whence);
}
bool discard_or_error(size_t count) override { return m_file->seek(count, SeekMode::FromCurrentPosition); }
bool unreliable_eof() const override { return m_file->eof(); }