diff options
Diffstat (limited to 'src/zenvfs/vfs.cpp')
| -rw-r--r-- | src/zenvfs/vfs.cpp | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/zenvfs/vfs.cpp b/src/zenvfs/vfs.cpp new file mode 100644 index 000000000..02dbc904c --- /dev/null +++ b/src/zenvfs/vfs.cpp @@ -0,0 +1,56 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +#include "zenvfs/vfs.h" +#include "vfsprovider.h" + +#include <zencore/iohash.h> +#include <zencore/scopeguard.h> +#include <zencore/string.h> +#include <zencore/thread.h> + +#if ZEN_WITH_VFS + +namespace zen { + +VfsHost::VfsHost(std::string_view VfsRootPath) : m_Provider(new VfsProvider(VfsRootPath)) +{ +} + +VfsHost::~VfsHost() +{ + delete m_Provider; +} + +void +VfsHost::Initialize() +{ + m_Provider->Initialize(); +} + +void +VfsHost::Run() +{ + m_Provider->Run(); +} + +void +VfsHost::RequestStop() +{ + m_Provider->RequestStop(); +} + +void +VfsHost::Cleanup() +{ + m_Provider->Cleanup(); +} + +void +VfsHost::AddMount(std::string_view Mountpoint, Ref<VfsTreeDataSource>&& DataSource) +{ + m_Provider->AddMount(Mountpoint, std::move(DataSource)); +} + +} // namespace zen + +#endif |