mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:57: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
|
@ -7,6 +7,7 @@
|
|||
#include <LibTest/TestCase.h>
|
||||
|
||||
#include <LibCompress/Brotli.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/Stream.h>
|
||||
|
||||
static void run_test(StringView const file_name)
|
||||
|
@ -18,12 +19,12 @@ static void run_test(StringView const file_name)
|
|||
DeprecatedString path = DeprecatedString::formatted("brotli-test-files/{}", file_name);
|
||||
#endif
|
||||
|
||||
auto cmp_file = MUST(Core::Stream::File::open(path, Core::Stream::OpenMode::Read));
|
||||
auto cmp_file = MUST(Core::File::open(path, Core::File::OpenMode::Read));
|
||||
auto cmp_data = MUST(cmp_file->read_until_eof());
|
||||
|
||||
DeprecatedString path_compressed = DeprecatedString::formatted("{}.br", path);
|
||||
|
||||
auto file = MUST(Core::Stream::File::open(path_compressed, Core::Stream::OpenMode::Read));
|
||||
auto file = MUST(Core::File::open(path_compressed, Core::File::OpenMode::Read));
|
||||
auto brotli_stream = Compress::BrotliDecompressionStream { *file };
|
||||
auto data = MUST(brotli_stream.read_until_eof());
|
||||
|
||||
|
@ -96,7 +97,7 @@ TEST_CASE(brotli_decompress_zero_one_bin)
|
|||
|
||||
DeprecatedString path_compressed = DeprecatedString::formatted("{}.br", path);
|
||||
|
||||
auto file = MUST(Core::Stream::File::open(path_compressed, Core::Stream::OpenMode::Read));
|
||||
auto file = MUST(Core::File::open(path_compressed, Core::File::OpenMode::Read));
|
||||
auto brotli_stream = Compress::BrotliDecompressionStream { *file };
|
||||
|
||||
u8 buffer_raw[4096];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue