mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
LibCore: Move Stream-based file into the Core
namespace
This commit is contained in:
parent
a96339b72b
commit
606a3982f3
218 changed files with 748 additions and 643 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/JsonObject.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/Stream.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
@ -56,7 +57,7 @@ DeprecatedString snake_casify(DeprecatedString const& dashy_name)
|
|||
|
||||
ErrorOr<JsonValue> read_entire_file_as_json(StringView filename)
|
||||
{
|
||||
auto file = TRY(Core::Stream::File::open(filename, Core::Stream::OpenMode::Read));
|
||||
auto file = TRY(Core::File::open(filename, Core::File::OpenMode::Read));
|
||||
auto json_size = TRY(file->size());
|
||||
auto json_data = TRY(ByteBuffer::create_uninitialized(json_size));
|
||||
TRY(file->read_entire_buffer(json_data.bytes()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue