diff options
author | Tim Schumacher <timschumi@gmx.de> | 2022-12-11 17:49:00 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-12 14:16:42 +0100 |
commit | ed4c2f2f8ea59295edceca77bf308df5de6872d6 (patch) | |
tree | c28004c0fcfe0146d40549c74ec256eb50f3eb44 /Userland/Applets | |
parent | 5061a905ff561743c7de9c7a413845b714ab4ee2 (diff) | |
download | serenity-ed4c2f2f8ea59295edceca77bf308df5de6872d6.zip |
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.
Diffstat (limited to 'Userland/Applets')
-rw-r--r-- | Userland/Applets/Network/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Applets/ResourceGraph/main.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
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)); } |