1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:37:45 +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

@ -7,7 +7,7 @@
#include <AK/DeprecatedString.h>
#include <AK/LexicalPath.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/File.h>
#include <LibCore/DeprecatedFile.h>
#include <LibCore/System.h>
#include <LibMain/Main.h>
#include <stdio.h>
@ -69,17 +69,17 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
new_path = combined_new_path.characters();
}
if (no_clobber && Core::File::exists(new_path))
if (no_clobber && Core::DeprecatedFile::exists(new_path))
continue;
rc = rename(old_path.characters(), new_path.characters());
if (rc < 0) {
if (errno == EXDEV) {
auto result = Core::File::copy_file_or_directory(
auto result = Core::DeprecatedFile::copy_file_or_directory(
new_path, old_path,
Core::File::RecursionMode::Allowed,
Core::File::LinkMode::Disallowed,
Core::File::AddDuplicateFileMarker::No);
Core::DeprecatedFile::RecursionMode::Allowed,
Core::DeprecatedFile::LinkMode::Disallowed,
Core::DeprecatedFile::AddDuplicateFileMarker::No);
if (result.is_error()) {
warnln("mv: could not move '{}': {}", old_path, static_cast<Error const&>(result.error()));