LibCore: Rename Stream::*_or_error to *_entire_buffer

All of our functions are `_or_error` (or are about to be), and maybe
making it less reminiscient of AK::Stream will make people use it more.
This commit is contained in:
Tim Schumacher 2022-12-11 18:27:30 +01:00 committed by Andreas Kling
parent ed4c2f2f8e
commit 6c7c5a6786
Notes: sideshowbarker 2024-07-17 03:22:57 +09:00
17 changed files with 44 additions and 36 deletions

View file

@ -17,7 +17,7 @@ static DeprecatedString read_all(DeprecatedString const& path)
auto file = MUST(Core::Stream::File::open(path, Core::Stream::OpenMode::Read));
auto file_size = MUST(file->size());
auto content = MUST(ByteBuffer::create_uninitialized(file_size));
if (!file->read_or_error(content.bytes()))
if (!file->read_entire_buffer(content.bytes()))
VERIFY_NOT_REACHED();
return DeprecatedString { content.bytes() };
}