From 782351959f697fca6b0804c134467b7d9c29da1a Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 20 Sep 2021 12:08:44 +0200 Subject: Moved more code into zen namespace, for consistency Also removed snapshot_manifest (remnants of vfs prototype) --- zencore/include/zencore/snapshot_manifest.h | 57 ----------------------------- 1 file changed, 57 deletions(-) delete mode 100644 zencore/include/zencore/snapshot_manifest.h (limited to 'zencore/include') diff --git a/zencore/include/zencore/snapshot_manifest.h b/zencore/include/zencore/snapshot_manifest.h deleted file mode 100644 index 95e64773a..000000000 --- a/zencore/include/zencore/snapshot_manifest.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright Epic Games, Inc. All Rights Reserved. - -#pragma once - -#include -#include - -#include -#include -#include -#include - -namespace zen { - -struct LeafNode -{ - uint64_t FileSize = 0; - uint64_t FileModifiedTime = 0; - zen::IoHash ChunkHash = zen::IoHash::Zero; - std::wstring Name; -}; - -struct TreeNode -{ - std::vector Children; - std::vector Leaves; - std::wstring Name; - zen::BLAKE3 ChunkHash = zen::BLAKE3::Zero; - - ZENCORE_API void VisitModifyFiles(std::function func); - ZENCORE_API void VisitFiles(std::function func); - ZENCORE_API void Finalize(); -}; - -struct SnapshotManifest -{ - std::string Id; - TreeNode Root; - zen::BLAKE3 ChunkHash = zen::BLAKE3::Zero; - - ZENCORE_API void finalize(); -}; - -class InStream; -class OutStream; - -ZENCORE_API void ReadManifest(SnapshotManifest& Manifest, InStream& FromStream); -ZENCORE_API void WriteManifest(const SnapshotManifest& Manifest, OutStream& ToStream); -ZENCORE_API void PrintManifest(const SnapshotManifest& Manifest, OutStream& ToStream); - -// Translate a user-provided manifest specification into a file path. -// Supports hashtag syntax to implicitly refer to user documents zenfs folder -ZENCORE_API std::filesystem::path ManifestSpecToPath(const char* ManifestSpec); - -void snapshotmanifest_forcelink(); - -} // namespace zen -- cgit v1.2.3