1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

Everywhere: Use LibFileSystem where trivial

This commit is contained in:
Cameron Youell 2023-03-22 02:35:30 +11:00 committed by Linus Groh
parent edab0cbf41
commit 1d24f394c6
115 changed files with 275 additions and 228 deletions

View file

@ -14,6 +14,7 @@
#include <LibCore/Directory.h>
#include <LibCore/System.h>
#include <LibDesktop/Launcher.h>
#include <LibFileSystem/FileSystem.h>
#include <LibGUI/BoxLayout.h>
#include <LibGUI/CheckBox.h>
#include <LibGUI/FileIconProvider.h>
@ -212,7 +213,7 @@ bool PropertiesWindow::apply_changes()
DeprecatedString new_name = m_name_box->text();
DeprecatedString new_file = make_full_path(new_name).characters();
if (Core::DeprecatedFile::exists(new_file)) {
if (FileSystem::exists(new_file)) {
GUI::MessageBox::show(this, DeprecatedString::formatted("A file \"{}\" already exists!", new_name), "Error"sv, GUI::MessageBox::Type::Error);
return false;
}