![]() |
Chira Engine
A customizable MIT-licensed game engine.
|
Public Member Functions | |
FilesystemResourceProvider (std::string path_, bool isPathAbsolute=false, const std::string &name_=FILESYSTEM_PROVIDER_NAME) | |
bool | hasResource (std::string_view name) const override |
void | compileResource (std::string_view name, Resource *resource) const override |
std::string_view | getPath () const |
bool | isAbsolute () const |
std::string | getFolder () const |
std::string | getLocalResourceAbsolutePath (const std::string &identifier) const |
![]() | |
IResourceProvider (std::string name) | |
std::string_view | getName () const |
Static Public Member Functions | |
static void | nixifyPath (std::string &path) |
Converts all backslashes in a string to forward slashes. | |
static std::string | getResourceIdentifier (std::string_view absolutePath) |
Takes an absolute path of a resource file and converts it to a resource identifier. More... | |
static std::string | getResourceFolderPath (std::string_view absolutePath) |
Takes an absolute path of a resource folder and converts it to a valid input path for a FilesystemResourceProvider. More... | |
static std::string | getResourceAbsolutePath (const std::string &identifier) |
Takes a resource identifier and returns the full absolute path, if it exists. | |
Static Public Attributes | |
static constexpr short | FILEPATH_MAX_LENGTH = 1024 |
Additional Inherited Members | |
![]() | |
std::string | providerName |
Definition at line 11 of file FilesystemResourceProvider.h.
|
static |
Takes an absolute path of a resource folder and converts it to a valid input path for a FilesystemResourceProvider.
Does not check if the resource identifier actually points to a valid resource.
Definition at line 121 of file FilesystemResourceProvider.cpp.
|
static |
Takes an absolute path of a resource file and converts it to a resource identifier.
Does not check if the resource identifier actually points to a valid resource.
Definition at line 114 of file FilesystemResourceProvider.cpp.