mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:47:36 +00:00
Userland: Use CFile inside sysctl
Also add a StringView overload to CIODevice::write
This commit is contained in:
parent
092f06a719
commit
e74b5975e4
2 changed files with 18 additions and 34 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue