mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:48:11 +00:00
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.
This commit is contained in:
parent
5061a905ff
commit
ed4c2f2f8e
65 changed files with 88 additions and 88 deletions
|
@ -826,7 +826,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto file = TRY(Core::Stream::File::open(arguments.strings[1], Core::Stream::OpenMode::Read));
|
||||
|
||||
auto file_contents = TRY(file->read_all());
|
||||
auto file_contents = TRY(file->read_until_eof());
|
||||
|
||||
auto endpoints = parse(file_contents);
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ static ErrorOr<ApprovalDate> parse_approval_date(StringView const& str)
|
|||
|
||||
static ErrorOr<HashMap<DeprecatedString, PnpIdData>> parse_pnp_ids_database(Core::Stream::File& pnp_ids_file)
|
||||
{
|
||||
auto pnp_ids_file_bytes = TRY(pnp_ids_file.read_all());
|
||||
auto pnp_ids_file_bytes = TRY(pnp_ids_file.read_until_eof());
|
||||
StringView pnp_ids_file_contents(pnp_ids_file_bytes);
|
||||
|
||||
HashMap<DeprecatedString, PnpIdData> pnp_id_data;
|
||||
|
|
|
@ -337,7 +337,7 @@ inline ErrorOr<NonnullOwnPtr<Core::Stream::BufferedFile>> open_file(StringView p
|
|||
inline ErrorOr<JsonValue> read_json_file(StringView path)
|
||||
{
|
||||
auto file = TRY(open_file(path, Core::Stream::OpenMode::Read));
|
||||
auto buffer = TRY(file->read_all());
|
||||
auto buffer = TRY(file->read_until_eof());
|
||||
|
||||
return JsonValue::from_string(buffer);
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return Error::from_string_view(s_error_string);
|
||||
}
|
||||
auto file = file_or_error.release_value();
|
||||
auto string = MUST(file->read_all());
|
||||
auto string = MUST(file->read_until_eof());
|
||||
file_contents.append(DeprecatedString(ReadonlyBytes(string)));
|
||||
}
|
||||
VERIFY(paths.size() == file_contents.size());
|
||||
|
|
|
@ -222,7 +222,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
args_parser.parse(arguments);
|
||||
|
||||
auto file = TRY(Core::Stream::File::open(path, Core::Stream::OpenMode::Read));
|
||||
auto content = TRY(file->read_all());
|
||||
auto content = TRY(file->read_until_eof());
|
||||
auto state_machine = parse_state_machine(content);
|
||||
|
||||
StringBuilder builder;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue