summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-09-14 16:12:56 +0100
committerLinus Groh <mail@linusgroh.de>2022-11-19 17:00:10 +0000
commitccebf8bf592efa6d8b3c6824b71c13665f103cc1 (patch)
tree2a8b7dda458c88ea3981443db093cafdf91c0b27
parent75208f2333ea900ec098dc573d206326c9519079 (diff)
downloadserenity-ccebf8bf592efa6d8b3c6824b71c13665f103cc1.zip
man: Port to Core::Stream
-rw-r--r--Userland/Utilities/man.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Utilities/man.cpp b/Userland/Utilities/man.cpp
index 5ae6d0ae9d..3aec0a54a7 100644
--- a/Userland/Utilities/man.cpp
+++ b/Userland/Utilities/man.cpp
@@ -8,7 +8,7 @@
#include <AK/ByteBuffer.h>
#include <AK/String.h>
#include <LibCore/ArgsParser.h>
-#include <LibCore/File.h>
+#include <LibCore/Stream.h>
#include <LibCore/System.h>
#include <LibMain/Main.h>
#include <LibMarkdown/Document.h>
@@ -108,12 +108,12 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
pager_command = String::formatted("less -P 'Manual Page {}({}) line %l?e (END):.'", StringView(name).replace("'"sv, "'\\''"sv, ReplaceMode::FirstOnly), StringView(section).replace("'"sv, "'\\''"sv, ReplaceMode::FirstOnly));
pid_t pager_pid = TRY(pipe_to_pager(pager_command));
- auto file = TRY(Core::File::open(filename, Core::OpenMode::ReadOnly));
+ auto file = TRY(Core::Stream::File::open(filename, Core::Stream::OpenMode::Read));
TRY(Core::System::pledge("stdio proc"));
- dbgln("Loading man page from {}", file->filename());
- auto buffer = file->read_all();
+ dbgln("Loading man page from {}", filename);
+ auto buffer = TRY(file->read_all());
auto source = String::copy(buffer);
const String title("SerenityOS manual");