ladybird/Userland/Libraries/LibCore/ResourceImplementationFile.h
Timothy Flynn 98a82565cd LibCore: Do not return an Optional from Resource:::filesystem_path
This API never returns OptionalNone, and all callers already assume as
much.
2023-11-06 09:39:59 +01:00

28 lines
719 B
C++

/*
* Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/RefPtr.h>
#include <AK/StringView.h>
#include <LibCore/Resource.h>
#include <LibCore/ResourceImplementation.h>
namespace Core {
class ResourceImplementationFile : public ResourceImplementation {
public:
explicit ResourceImplementationFile(String base_directory);
virtual ErrorOr<NonnullRefPtr<Resource>> load_from_resource_scheme_uri(StringView) override;
virtual Vector<String> child_names_for_resource_scheme(Resource const&) override;
virtual String filesystem_path_for_resource_scheme(String const&) override;
private:
String m_base_directory;
};
}