1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 02:38:13 +00:00

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
parent 988763c0ef
commit 463a645d37

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