1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:18:12 +00:00

CIODevice: Add some basic output facilities: write() and printf().

Being able to do file.printf() is extremely comfy, I have to say. :^)
This commit is contained in:
Andreas Kling 2019-05-08 04:38:41 +02:00
parent b719bf7fde
commit 7ce3b10568
2 changed files with 27 additions and 0 deletions

View file

@ -30,6 +30,8 @@ public:
ByteBuffer read_line(int max_size);
ByteBuffer read_all();
bool write(const byte*, int size);
// FIXME: I would like this to be const but currently it needs to call populate_read_buffer().
bool can_read_line();
@ -40,6 +42,8 @@ public:
virtual bool open(CIODevice::OpenMode) = 0;
virtual bool close();
int printf(const char*, ...);
virtual const char* class_name() const override { return "CIODevice"; }
protected: