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:
parent
2a1fc96650
commit
98a82565cd
6 changed files with 16 additions and 9 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue