mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +00:00
Everywhere: Use LibFileSystem
where trivial
This commit is contained in:
parent
edab0cbf41
commit
1d24f394c6
115 changed files with 275 additions and 228 deletions
|
@ -12,7 +12,7 @@
|
|||
#include <AK/Optional.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/URL.h>
|
||||
#include <LibCore/DeprecatedFile.h>
|
||||
#include <LibFileSystem/FileSystem.h>
|
||||
#include <LibManual/Path.h>
|
||||
|
||||
namespace Manual {
|
||||
|
@ -48,7 +48,7 @@ ErrorOr<NonnullRefPtr<PageNode const>> Node::try_create_from_query(Vector<String
|
|||
Optional<NonnullRefPtr<PageNode>> maybe_page;
|
||||
for (auto const& section : sections) {
|
||||
auto const page = TRY(try_make_ref_counted<PageNode>(section, TRY(String::from_utf8(first_query_parameter))));
|
||||
if (Core::DeprecatedFile::exists(TRY(page->path()))) {
|
||||
if (FileSystem::exists(TRY(page->path()))) {
|
||||
maybe_page = page;
|
||||
break;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ ErrorOr<NonnullRefPtr<PageNode const>> Node::try_create_from_query(Vector<String
|
|||
auto second_query_parameter = *query_parameter_iterator;
|
||||
auto section = TRY(SectionNode::try_create_from_number(first_query_parameter));
|
||||
auto const page = TRY(try_make_ref_counted<PageNode>(section, TRY(String::from_utf8(second_query_parameter))));
|
||||
if (Core::DeprecatedFile::exists(TRY(page->path())))
|
||||
if (FileSystem::exists(TRY(page->path())))
|
||||
return page;
|
||||
return Error::from_string_literal("Page doesn't exist in section");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue