diff options
author | Tim Schumacher <timschumi@gmx.de> | 2023-02-09 03:02:46 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-13 00:50:07 +0000 |
commit | 606a3982f34d777f121fcc4aa964141199676c20 (patch) | |
tree | 836fef41d11f1b77f4dac7d699e5c9f720ee4ff1 /Userland/Utilities/comm.cpp | |
parent | a96339b72b3b417ffaa4fbb4e7575149f749acaa (diff) | |
download | serenity-606a3982f34d777f121fcc4aa964141199676c20.zip |
LibCore: Move Stream-based file into the `Core` namespace
Diffstat (limited to 'Userland/Utilities/comm.cpp')
-rw-r--r-- | Userland/Utilities/comm.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Userland/Utilities/comm.cpp b/Userland/Utilities/comm.cpp index 370bdc4ea1..0040c94ce4 100644 --- a/Userland/Utilities/comm.cpp +++ b/Userland/Utilities/comm.cpp @@ -7,6 +7,7 @@ #include <LibCore/ArgsParser.h> #include <LibCore/DeprecatedFile.h> +#include <LibCore/File.h> #include <LibCore/Stream.h> #include <LibCore/System.h> #include <LibMain/Main.h> @@ -62,7 +63,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) } auto open_file = [](DeprecatedString const& path, auto& file, int file_number) { - auto file_or_error = Core::Stream::File::open_file_or_standard_stream(path, Core::Stream::OpenMode::Read); + auto file_or_error = Core::File::open_file_or_standard_stream(path, Core::File::OpenMode::Read); if (file_or_error.is_error()) { warnln("Failed to open file{} '{}': {}", file_number, path, file_or_error.error()); return false; @@ -73,7 +74,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) return false; } - auto buffered_file_or_error = Core::Stream::BufferedFile::create(file_or_error.release_value()); + auto buffered_file_or_error = Core::BufferedFile::create(file_or_error.release_value()); if (buffered_file_or_error.is_error()) { warnln("Failed to create buffer for file{} '{}': {}", file_number, path, buffered_file_or_error.error()); return false; @@ -83,8 +84,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) return true; }; - OwnPtr<Core::Stream::BufferedFile> file1; - OwnPtr<Core::Stream::BufferedFile> file2; + OwnPtr<Core::BufferedFile> file1; + OwnPtr<Core::BufferedFile> file2; if (!(open_file(file1_path, file1, 1) && open_file(file2_path, file2, 2))) return 1; |