diff options
| author | Stefan Boberg <[email protected]> | 2023-09-20 15:22:03 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-20 15:22:03 +0200 |
| commit | 14d7568f9c7d970b7bbf7b6463a0a8530f98bb6f (patch) | |
| tree | bf24ac15759385cea339f7e1cf5380f984f5699a /src/zenvfs/vfs.cpp | |
| parent | changelog version bump (diff) | |
| download | zen-14d7568f9c7d970b7bbf7b6463a0a8530f98bb6f.tar.xz zen-14d7568f9c7d970b7bbf7b6463a0a8530f98bb6f.zip | |
VFS implementation for local storage service (#396)
currently, only Windows (using Projected File System) is supported
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 |