1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +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

@ -9,6 +9,7 @@
#include <AK/BuiltinWrappers.h>
#include <AK/Utf32View.h>
#include <AK/Utf8View.h>
#include <LibCore/File.h>
#include <LibCore/Stream.h>
#include <LibGfx/Font/FontDatabase.h>
#include <LibGfx/Font/FontStyleMapping.h>
@ -257,7 +258,7 @@ ErrorOr<void> BitmapFont::write_to_file(DeprecatedString const& path)
memcpy(header.name, m_name.characters(), min(m_name.length(), sizeof(header.name) - 1));
memcpy(header.family, m_family.characters(), min(m_family.length(), sizeof(header.family) - 1));
auto stream = TRY(Core::Stream::File::open(path, Core::Stream::OpenMode::Write));
auto stream = TRY(Core::File::open(path, Core::File::OpenMode::Write));
size_t bytes_per_glyph = sizeof(u32) * m_glyph_height;
TRY(stream->write_entire_buffer({ &header, sizeof(header) }));
TRY(stream->write_entire_buffer({ m_range_mask, m_range_mask_size }));