1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:37:35 +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 "ProjectBuilder.h"
#include <AK/LexicalPath.h>
#include <LibCore/Command.h>
#include <LibCore/File.h>
#include <LibCore/DeprecatedFile.h>
#include <LibCore/Stream.h>
#include <LibRegex/Regex.h>
#include <fcntl.h>
@ -125,15 +125,15 @@ ErrorOr<DeprecatedString> ProjectBuilder::component_name(StringView cmake_file_p
ErrorOr<void> ProjectBuilder::initialize_build_directory()
{
if (!Core::File::exists(build_directory())) {
if (!Core::DeprecatedFile::exists(build_directory())) {
if (mkdir(LexicalPath::join(build_directory()).string().characters(), 0700)) {
return Error::from_errno(errno);
}
}
auto cmake_file_path = LexicalPath::join(build_directory(), "CMakeLists.txt"sv).string();
if (Core::File::exists(cmake_file_path))
MUST(Core::File::remove(cmake_file_path, Core::File::RecursionMode::Disallowed));
if (Core::DeprecatedFile::exists(cmake_file_path))
MUST(Core::DeprecatedFile::remove(cmake_file_path, Core::DeprecatedFile::RecursionMode::Disallowed));
auto cmake_file = TRY(Core::Stream::File::open(cmake_file_path, Core::Stream::OpenMode::Write));
TRY(cmake_file->write_entire_buffer(generate_cmake_file_content().bytes()));
@ -151,7 +151,7 @@ Optional<DeprecatedString> ProjectBuilder::find_cmake_file_for(StringView file_p
auto directory = LexicalPath::dirname(file_path);
while (!directory.is_empty()) {
auto cmake_path = LexicalPath::join(m_project_root, directory, "CMakeLists.txt"sv);
if (Core::File::exists(cmake_path.string()))
if (Core::DeprecatedFile::exists(cmake_path.string()))
return cmake_path.string();
directory = LexicalPath::dirname(directory);
}