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:
parent
988763c0ef
commit
463a645d37
1 changed files with 5 additions and 0 deletions
|
@ -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(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue