summaryrefslogtreecommitdiff
path: root/Userland/Utilities/headless-browser.cpp
diff options
context:
space:
mode:
authorCameron Youell <cameronyouell@gmail.com>2023-03-22 02:35:30 +1100
committerLinus Groh <mail@linusgroh.de>2023-03-21 19:03:21 +0000
commit1d24f394c61d8e2af216c95303014d0554165f72 (patch)
treee577780754109c9b38a81cfc815d35f19c68eb9d /Userland/Utilities/headless-browser.cpp
parentedab0cbf41d80e805fe93ee0c4cc5021a1e599c1 (diff)
downloadserenity-1d24f394c61d8e2af216c95303014d0554165f72.zip
Everywhere: Use `LibFileSystem` where trivial
Diffstat (limited to 'Userland/Utilities/headless-browser.cpp')
-rw-r--r--Userland/Utilities/headless-browser.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Userland/Utilities/headless-browser.cpp b/Userland/Utilities/headless-browser.cpp
index 2f081e2415..975c257726 100644
--- a/Userland/Utilities/headless-browser.cpp
+++ b/Userland/Utilities/headless-browser.cpp
@@ -24,6 +24,7 @@
#include <LibCore/EventLoop.h>
#include <LibCore/File.h>
#include <LibCore/Timer.h>
+#include <LibFileSystem/FileSystem.h>
#include <LibGfx/Bitmap.h>
#include <LibGfx/Font/FontDatabase.h>
#include <LibGfx/PNGWriter.h>
@@ -164,8 +165,8 @@ static ErrorOr<NonnullRefPtr<Core::Timer>> load_page_for_screenshot_and_exit(Cor
// FIXME: Allow passing the output path as an argument.
static constexpr auto output_file_path = "output.png"sv;
- if (Core::DeprecatedFile::exists(output_file_path))
- TRY(Core::DeprecatedFile::remove(output_file_path, Core::DeprecatedFile::RecursionMode::Disallowed));
+ if (FileSystem::exists(output_file_path))
+ TRY(FileSystem::remove(output_file_path, FileSystem::RecursionMode::Disallowed));
outln("Taking screenshot after {} seconds", screenshot_timeout);
@@ -191,7 +192,7 @@ static ErrorOr<NonnullRefPtr<Core::Timer>> load_page_for_screenshot_and_exit(Cor
static ErrorOr<URL> format_url(StringView url)
{
- if (Core::DeprecatedFile::exists(url))
+ if (FileSystem::exists(url))
return URL::create_with_file_scheme(Core::DeprecatedFile::real_path_for(url));
URL formatted_url { url };