1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47: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:
Tim Schumacher 2023-02-08 21:08:01 +01:00 committed by Linus Groh
parent 14951b92ca
commit d43a7eae54
193 changed files with 536 additions and 556 deletions

View file

@ -11,7 +11,7 @@
#include <AK/NumberFormat.h>
#include <AK/StringBuilder.h>
#include <LibConfig/Client.h>
#include <LibCore/File.h>
#include <LibCore/DeprecatedFile.h>
#include <LibCore/MimeData.h>
#include <LibCore/StandardPaths.h>
#include <LibGUI/FileIconProvider.h>
@ -204,7 +204,7 @@ void DirectoryView::setup_model()
while (model_root.string() != "/") {
model_root = model_root.parent();
if (Core::File::is_directory(model_root.string()))
if (Core::DeprecatedFile::is_directory(model_root.string()))
break;
}
@ -405,8 +405,8 @@ void DirectoryView::add_path_to_history(DeprecatedString path)
bool DirectoryView::open(DeprecatedString const& path)
{
auto real_path = Core::File::real_path_for(path);
if (real_path.is_null() || !Core::File::is_directory(path))
auto real_path = Core::DeprecatedFile::real_path_for(path);
if (real_path.is_null() || !Core::DeprecatedFile::is_directory(path))
return false;
if (chdir(real_path.characters()) < 0) {
@ -555,7 +555,7 @@ bool DirectoryView::can_modify_current_selection()
// FIXME: remove once Clang formats this properly.
// clang-format off
return selections.first_matching([&](auto& index) {
return Core::File::can_delete_or_move(node(index).full_path());
return Core::DeprecatedFile::can_delete_or_move(node(index).full_path());
}).has_value();
// clang-format on
}