mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 02:26:10 +00:00
LibCore: Add helper to load a possibly-relative path into a Resource
This commit is contained in:
parent
81366b860b
commit
a4c7d9a374
Notes:
sideshowbarker
2024-07-17 10:31:19 +09:00
Author: https://github.com/ADKaster
Commit: a4c7d9a374
Pull-request: https://github.com/SerenityOS/serenity/pull/21493
2 changed files with 13 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
|||
namespace Core {
|
||||
class Resource : public RefCounted<Resource> {
|
||||
public:
|
||||
static ErrorOr<NonnullRefPtr<Resource>> load_from_filesystem(StringView);
|
||||
static ErrorOr<NonnullRefPtr<Resource>> load_from_uri(StringView);
|
||||
|
||||
[[nodiscard]] bool is_file() const { return !m_data.has<DirectoryTag>(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue