mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:47:34 +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
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/Stream.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibCrypto/Checksum/Adler32.h>
|
||||
|
@ -46,7 +47,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
Array<u8, PAGE_SIZE> buffer;
|
||||
|
||||
for (auto& path : paths) {
|
||||
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);
|
||||
auto filepath = (path == "-") ? "/dev/stdin" : path;
|
||||
if (file_or_error.is_error()) {
|
||||
warnln("{}: {}: {}", arguments.strings[0], filepath, file_or_error.error());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue