mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:57:46 +00:00
LibCore: Rename File
to DeprecatedFile
As usual, this removes many unused includes and moves used includes further down the chain.
This commit is contained in:
parent
14951b92ca
commit
d43a7eae54
193 changed files with 536 additions and 556 deletions
|
@ -10,7 +10,6 @@
|
|||
#include <AK/LexicalPath.h>
|
||||
#include <Applications/Spreadsheet/CSVImportGML.h>
|
||||
#include <Applications/Spreadsheet/FormatSelectionPageGML.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/CheckBox.h>
|
||||
#include <LibGUI/ComboBox.h>
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "../CSV.h"
|
||||
#include "../XSV.h"
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <string.h>
|
||||
|
||||
TEST_CASE(should_parse_valid_data)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include <AK/ScopeGuard.h>
|
||||
#include <AK/TemporaryChange.h>
|
||||
#include <AK/URL.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/DeprecatedFile.h>
|
||||
#include <LibJS/Interpreter.h>
|
||||
#include <LibJS/Parser.h>
|
||||
#include <LibJS/Runtime/AbstractOperations.h>
|
||||
|
@ -49,7 +49,7 @@ Sheet::Sheet(Workbook& workbook)
|
|||
|
||||
// Sadly, these have to be evaluated once per sheet.
|
||||
constexpr auto runtime_file_path = "/res/js/Spreadsheet/runtime.js"sv;
|
||||
auto file_or_error = Core::File::open(runtime_file_path, Core::OpenMode::ReadOnly);
|
||||
auto file_or_error = Core::DeprecatedFile::open(runtime_file_path, Core::OpenMode::ReadOnly);
|
||||
if (!file_or_error.is_error()) {
|
||||
auto buffer = file_or_error.value()->read_all();
|
||||
auto script_or_error = JS::Script::parse(buffer, interpreter().realm(), runtime_file_path);
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include <AK/ScopeGuard.h>
|
||||
#include <AK/Try.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibFileSystemAccessClient/Client.h>
|
||||
#include <LibGUI/Application.h>
|
||||
|
@ -34,7 +33,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
args_parser.parse(arguments);
|
||||
|
||||
if (filename) {
|
||||
if (!Core::File::exists({ filename, strlen(filename) }) || Core::File::is_directory(filename)) {
|
||||
if (!Core::DeprecatedFile::exists({ filename, strlen(filename) }) || Core::DeprecatedFile::is_directory(filename)) {
|
||||
warnln("File does not exist or is a directory: {}", filename);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue