summaryrefslogtreecommitdiff
path: root/LibCore
diff options
context:
space:
mode:
authorRobin Burchell <robin+git@viroteck.net>2019-06-02 12:05:06 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-06-02 12:55:51 +0200
commite74b5975e4c17a44b73f7b511fb643a5fb78ce41 (patch)
tree88d3610657a0de89ad65a35db56c67314b170508 /LibCore
parent092f06a71959f9015a487d6e05fd15f5cac541d0 (diff)
downloadserenity-e74b5975e4c17a44b73f7b511fb643a5fb78ce41.zip
Userland: Use CFile inside sysctl
Also add a StringView overload to CIODevice::write
Diffstat (limited to 'LibCore')
-rw-r--r--LibCore/CIODevice.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/LibCore/CIODevice.h b/LibCore/CIODevice.h
index 4977c3f33b..193b44c3bd 100644
--- a/LibCore/CIODevice.h
+++ b/LibCore/CIODevice.h
@@ -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();