diff options
| author | Stefan Boberg <[email protected]> | 2023-11-16 17:20:52 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-16 17:20:52 +0100 |
| commit | 372d3a8a1ff65e53d139a7ee1db022d8cfa55982 (patch) | |
| tree | df88c47001bf16c15d12dcfba8cf8850d7e85cbd /src/zencore/include | |
| parent | changed posix event implementation to use std::atomic instead of volatile (#547) (diff) | |
| download | zen-372d3a8a1ff65e53d139a7ee1db022d8cfa55982.tar.xz zen-372d3a8a1ff65e53d139a7ee1db022d8cfa55982.zip | |
add zenserver state snapshot support (#543)
this introduces a --snapshot-dir command line option to zenserver which specifies a directory which will be propagated to the persistence root directory on start-up.
This is most powerful with file systems which support block cloning, such as ReFS on Windows. This allows even very large state snapshots to be used repeatedly without having to worry about mutating the original dataset on disk. When using ReFS the state copy for even large state directories can be very fast since the duration is primarily proportional to the number of files in the tree rather than the size of the files being cloned. The storage requirements are also minimal as all data will be handled in a copy-on-write manner.
Diffstat (limited to 'src/zencore/include')
| -rw-r--r-- | src/zencore/include/zencore/filesystem.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/zencore/include/zencore/filesystem.h b/src/zencore/include/zencore/filesystem.h index 22eb40e45..963890fb9 100644 --- a/src/zencore/include/zencore/filesystem.h +++ b/src/zencore/include/zencore/filesystem.h @@ -1,5 +1,4 @@ // Copyright Epic Games, Inc. All Rights Reserved. -// Copyright Epic Games, Inc. All Rights Reserved. #pragma once @@ -87,6 +86,7 @@ struct CopyFileOptions }; ZENCORE_API bool CopyFile(std::filesystem::path FromPath, std::filesystem::path ToPath, const CopyFileOptions& Options); +ZENCORE_API void CopyTree(std::filesystem::path FromPath, std::filesystem::path ToPath, const CopyFileOptions& Options); ZENCORE_API bool SupportsBlockRefCounting(std::filesystem::path Path); ZENCORE_API void PathToUtf8(const std::filesystem::path& Path, StringBuilderBase& Out); |