mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:17:34 +00:00
LibCore+AK: Move MappedFile from AK to LibCore
MappedFile is strictly a userspace thing, so it doesn't belong in AK (which is supposed to be user/kernel agnostic.)
This commit is contained in:
parent
c1c9da6c35
commit
58fb3ebf66
48 changed files with 101 additions and 103 deletions
|
@ -4,10 +4,10 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/MappedFile.h>
|
||||
#include <LibCompress/Gzip.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/FileStream.h>
|
||||
#include <LibCore/MappedFile.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
@ -41,7 +41,7 @@ int main(int argc, char** argv)
|
|||
|
||||
// We map the whole file instead of streaming to reduce size overhead (gzip header) and increase the deflate block size (better compression)
|
||||
// TODO: automatically fallback to buffered streaming for very large files
|
||||
auto file_or_error = MappedFile::map(input_filename);
|
||||
auto file_or_error = Core::MappedFile::map(input_filename);
|
||||
if (file_or_error.is_error()) {
|
||||
warnln("Failed opening input file for reading: {}", file_or_error.error());
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue