Core/AppFilesystemComponent: Add MountDefaultDirectories
This commit is contained in:
parent
b4cb4ef6d6
commit
dd97832430
|
|
@ -43,6 +43,8 @@ namespace Nz
|
|||
inline const VirtualDirectoryPtr& Mount(std::string_view name, std::filesystem::path filepath);
|
||||
inline const VirtualDirectoryPtr& Mount(std::string_view name, VirtualDirectoryPtr directory);
|
||||
|
||||
inline void MountDefaultDirectories();
|
||||
|
||||
template<typename T> std::shared_ptr<T> Open(std::string_view assetPath);
|
||||
template<typename T> std::shared_ptr<T> Open(std::string_view assetPath, typename T::Params params);
|
||||
|
||||
|
|
|
|||
|
|
@ -72,6 +72,11 @@ namespace Nz
|
|||
return m_rootDirectory->StoreDirectory(name, std::move(directory)).directory;
|
||||
}
|
||||
|
||||
inline void AppFilesystemComponent::MountDefaultDirectories()
|
||||
{
|
||||
m_rootDirectory = std::make_shared<VirtualDirectory>(std::filesystem::current_path());
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
std::shared_ptr<T> AppFilesystemComponent::Open(std::string_view assetPath)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue