1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

LibCore: Do not return an Optional from Resource:::filesystem_path

This API never returns OptionalNone, and all callers already assume as
much.
This commit is contained in:
Timothy Flynn 2023-11-05 08:05:22 -05:00 committed by Andreas Kling
parent 2a1fc96650
commit 98a82565cd
6 changed files with 16 additions and 9 deletions

View file

@ -70,14 +70,14 @@ Vector<String> ResourceImplementation::child_names(Resource const& resource)
VERIFY(resource.m_scheme == Resource::Scheme::File);
Vector<String> children;
Core::DirIterator it(resource.filesystem_path().release_value().to_deprecated_string(), Core::DirIterator::SkipParentAndBaseDir);
Core::DirIterator it(resource.filesystem_path().to_deprecated_string(), Core::DirIterator::SkipParentAndBaseDir);
while (it.has_next())
children.append(MUST(String::from_deprecated_string(it.next_path())));
return children;
}
Optional<String> ResourceImplementation::filesystem_path(Resource const& resource)
String ResourceImplementation::filesystem_path(Resource const& resource)
{
if (resource.m_scheme == Resource::Scheme::Resource)
return filesystem_path_for_resource_scheme(resource.m_path);