1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:47:35 +00:00

LibCore+Tests: Add SeekableStream::truncate()

This commit is contained in:
Sam Atkins 2022-02-03 19:21:51 +00:00 committed by Tim Flynn
parent d9fb1b8c2e
commit 4d5080388a
4 changed files with 27 additions and 0 deletions

View file

@ -26,6 +26,8 @@ public:
virtual bool is_open() const override { return true; }
// FIXME: It doesn't make sense to close an memory stream. Therefore, we don't do anything here. Is that fine?
virtual void close() override { }
// FIXME: It doesn't make sense to truncate a memory stream. Therefore, we don't do anything here. Is that fine?
virtual ErrorOr<void> truncate(off_t) override { return Error::from_errno(ENOTSUP); }
virtual ErrorOr<size_t> read(Bytes bytes) override
{