1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:37:34 +00:00

Userland: Use CFile inside sysctl

Also add a StringView overload to CIODevice::write
This commit is contained in:
Robin Burchell 2019-06-02 12:05:06 +02:00 committed by Andreas Kling
parent 092f06a719
commit e74b5975e4
2 changed files with 18 additions and 34 deletions

View file

@ -1,6 +1,7 @@
#pragma once
#include <AK/ByteBuffer.h>
#include <AK/StringView.h>
#include <LibCore/CObject.h>
class CIODevice : public CObject {
@ -32,6 +33,7 @@ public:
ByteBuffer read_all();
bool write(const byte*, int size);
bool write(const AK::StringView& v) { return write((const byte*)v.characters(), v.length()); }
// FIXME: I would like this to be const but currently it needs to call populate_read_buffer().
bool can_read_line();