mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:37:43 +00:00
AK: Add the Input
word to input-only buffered streams
This concerns both `BufferedSeekable` and `BufferedFile`.
This commit is contained in:
parent
48b000a36c
commit
8c34959b53
50 changed files with 101 additions and 102 deletions
|
@ -27,9 +27,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
bool had_errors = false;
|
||||
for (auto filename : arguments.strings.slice(1)) {
|
||||
|
||||
auto const open_file = [](StringView filename) -> ErrorOr<NonnullOwnPtr<Core::BufferedFile>> {
|
||||
auto const open_file = [](StringView filename) -> ErrorOr<NonnullOwnPtr<Core::InputBufferedFile>> {
|
||||
auto file = TRY(Core::File::open(filename, Core::File::OpenMode::Read));
|
||||
return Core::BufferedFile::create(move(file));
|
||||
return Core::InputBufferedFile::create(move(file));
|
||||
};
|
||||
|
||||
auto file_or_error = open_file(filename);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue