1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 03:18:11 +00:00

LibCore: Move Stream-based file into the Core namespace

This commit is contained in:
Tim Schumacher 2023-02-09 03:02:46 +01:00 committed by Linus Groh
parent a96339b72b
commit 606a3982f3
218 changed files with 748 additions and 643 deletions

View file

@ -7,6 +7,7 @@
#include <AK/DeprecatedString.h>
#include <AK/LexicalPath.h>
#include <LibCore/File.h>
#include <LibCore/Stream.h>
#include <LibGL/GL/gl.h>
#include <LibGL/GLContext.h>
@ -36,7 +37,7 @@ static void expect_bitmap_equals_reference(Gfx::Bitmap const& bitmap, StringView
if constexpr (SAVE_OUTPUT) {
auto target_path = LexicalPath("/home/anon").append(reference_filename);
auto qoi_buffer = Gfx::QOIWriter::encode(bitmap);
auto qoi_output_stream = MUST(Core::Stream::File::open(target_path.string(), Core::Stream::OpenMode::Write));
auto qoi_output_stream = MUST(Core::File::open(target_path.string(), Core::File::OpenMode::Write));
MUST(qoi_output_stream->write_entire_buffer(qoi_buffer));
}