From ed4c2f2f8ea59295edceca77bf308df5de6872d6 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Sun, 11 Dec 2022 17:49:00 +0100 Subject: LibCore: Rename `Stream::read_all` to `read_until_eof` This generally seems like a better name, especially if we somehow also need a better name for "read the entire buffer, but not the entire file" somewhere down the line. --- Userland/Applets/Network/main.cpp | 2 +- Userland/Applets/ResourceGraph/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland/Applets') diff --git a/Userland/Applets/Network/main.cpp b/Userland/Applets/Network/main.cpp index 758644bd96..7a3f3bac75 100644 --- a/Userland/Applets/Network/main.cpp +++ b/Userland/Applets/Network/main.cpp @@ -113,7 +113,7 @@ private: return ""; } - auto file_contents_or_error = file_or_error.value()->read_all(); + auto file_contents_or_error = file_or_error.value()->read_until_eof(); if (file_contents_or_error.is_error()) { dbgln("Error: Could not read /sys/kernel/net/adapters: {}", file_contents_or_error.error()); return ""; diff --git a/Userland/Applets/ResourceGraph/main.cpp b/Userland/Applets/ResourceGraph/main.cpp index 392e2140a5..442ac13be6 100644 --- a/Userland/Applets/ResourceGraph/main.cpp +++ b/Userland/Applets/ResourceGraph/main.cpp @@ -153,7 +153,7 @@ private: file = TRY(Core::Stream::File::open(filename, Core::Stream::OpenMode::Read)); } - auto file_contents = TRY(file->read_all()); + auto file_contents = TRY(file->read_until_eof()); return TRY(JsonValue::from_string(file_contents)); } -- cgit v1.2.3