summaryrefslogtreecommitdiff
path: root/Ladybird
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-02-08 21:08:01 +0100
committerLinus Groh <mail@linusgroh.de>2023-02-13 00:50:07 +0000
commitd43a7eae545cd699f301471bd0f82399174339c1 (patch)
treec0a55f768f845041c3aebed3f126d462155a799f /Ladybird
parent14951b92ca6160664ccb68c5e1b2d40133763e5f (diff)
downloadserenity-d43a7eae545cd699f301471bd0f82399174339c1.zip
LibCore: Rename `File` to `DeprecatedFile`
As usual, this removes many unused includes and moves used includes further down the chain.
Diffstat (limited to 'Ladybird')
-rw-r--r--Ladybird/AndroidPlatform.cpp5
-rw-r--r--Ladybird/Utilities.cpp4
-rw-r--r--Ladybird/WebContent/main.cpp1
-rw-r--r--Ladybird/WebContentView.cpp1
-rw-r--r--Ladybird/main.cpp6
5 files changed, 7 insertions, 10 deletions
diff --git a/Ladybird/AndroidPlatform.cpp b/Ladybird/AndroidPlatform.cpp
index c88a4dce3d..b1f8104314 100644
--- a/Ladybird/AndroidPlatform.cpp
+++ b/Ladybird/AndroidPlatform.cpp
@@ -13,7 +13,6 @@
#include <LibArchive/Tar.h>
#include <LibArchive/TarStream.h>
#include <LibCore/Directory.h>
-#include <LibCore/File.h>
#include <LibCore/FileStream.h>
#include <LibCore/Stream.h>
#include <LibCore/System.h>
@@ -68,7 +67,7 @@ ErrorOr<void> extract_tar_archive(DeprecatedString archive_file, DeprecatedStrin
{
constexpr size_t buffer_size = 4096;
- auto file = TRY(Core::File::open(archive_file, Core::OpenMode::ReadOnly));
+ auto file = TRY(Core::DeprecatedFile::open(archive_file, Core::OpenMode::ReadOnly));
DeprecatedString old_pwd = TRY(Core::System::getcwd());
@@ -155,7 +154,7 @@ ErrorOr<void> extract_tar_archive(DeprecatedString archive_file, DeprecatedStrin
path = path.prepend(header.prefix());
DeprecatedString filename = get_override("path"sv).value_or(path.string());
- DeprecatedString absolute_path = Core::File::absolute_path(filename);
+ DeprecatedString absolute_path = Core::DeprecatedFile::absolute_path(filename);
auto parent_path = LexicalPath(absolute_path).parent();
switch (header.type_flag()) {
diff --git a/Ladybird/Utilities.cpp b/Ladybird/Utilities.cpp
index 7c823644c7..12a534a1a6 100644
--- a/Ladybird/Utilities.cpp
+++ b/Ladybird/Utilities.cpp
@@ -9,7 +9,7 @@
#include "Utilities.h"
#include <AK/LexicalPath.h>
#include <AK/Platform.h>
-#include <LibCore/File.h>
+#include <LibCore/DeprecatedFile.h>
#include <QCoreApplication>
DeprecatedString s_serenity_resource_root;
@@ -43,7 +43,7 @@ void platform_init()
auto* home = getenv("XDG_CONFIG_HOME") ?: getenv("HOME");
VERIFY(home);
auto home_lagom = DeprecatedString::formatted("{}/.lagom", home);
- if (Core::File::is_directory(home_lagom))
+ if (Core::DeprecatedFile::is_directory(home_lagom))
return home_lagom;
auto app_dir = ak_deprecated_string_from_qstring(QCoreApplication::applicationDirPath());
return LexicalPath(app_dir).parent().append("share"sv).string();
diff --git a/Ladybird/WebContent/main.cpp b/Ladybird/WebContent/main.cpp
index 31aef09d75..0a68d2ed28 100644
--- a/Ladybird/WebContent/main.cpp
+++ b/Ladybird/WebContent/main.cpp
@@ -15,7 +15,6 @@
#include <AK/LexicalPath.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/EventLoop.h>
-#include <LibCore/File.h>
#include <LibCore/LocalServer.h>
#include <LibCore/System.h>
#include <LibCore/SystemServerTakeover.h>
diff --git a/Ladybird/WebContentView.cpp b/Ladybird/WebContentView.cpp
index d6d9c7ef46..690b1c0d72 100644
--- a/Ladybird/WebContentView.cpp
+++ b/Ladybird/WebContentView.cpp
@@ -24,7 +24,6 @@
#include <Kernel/API/KeyCode.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/EventLoop.h>
-#include <LibCore/File.h>
#include <LibCore/IODevice.h>
#include <LibCore/Stream.h>
#include <LibCore/System.h>
diff --git a/Ladybird/main.cpp b/Ladybird/main.cpp
index b6fa18b614..f29490a050 100644
--- a/Ladybird/main.cpp
+++ b/Ladybird/main.cpp
@@ -13,8 +13,8 @@
#include <Browser/CookieJar.h>
#include <Browser/Database.h>
#include <LibCore/ArgsParser.h>
+#include <LibCore/DeprecatedFile.h>
#include <LibCore/EventLoop.h>
-#include <LibCore/File.h>
#include <LibCore/Stream.h>
#include <LibCore/System.h>
#include <LibGfx/Font/FontDatabase.h>
@@ -79,8 +79,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto get_formatted_url = [&](StringView const& raw_url) -> URL {
URL url = raw_url;
- if (Core::File::exists(raw_url))
- url = URL::create_with_file_scheme(Core::File::real_path_for(raw_url));
+ if (Core::DeprecatedFile::exists(raw_url))
+ url = URL::create_with_file_scheme(Core::DeprecatedFile::real_path_for(raw_url));
else if (!url.is_valid())
url = DeprecatedString::formatted("http://{}", raw_url);
return url;