aboutsummaryrefslogtreecommitdiff
path: root/zenstore/include
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-05-21 20:40:09 +0200
committerStefan Boberg <[email protected]>2021-05-21 20:40:09 +0200
commit83e3c364e6403883cd60e7dda10165b6e84269f3 (patch)
treedc190b846bc73968988690880cdf1f5f8f6aaeb0 /zenstore/include
parentMerge branch 'jupiter-structured' of https://github.com/EpicGames/zen into ju... (diff)
downloadzen-83e3c364e6403883cd60e7dda10165b6e84269f3.tar.xz
zen-83e3c364e6403883cd60e7dda10165b6e84269f3.zip
Moved CasBlobFile into basicfile.h
Diffstat (limited to 'zenstore/include')
-rw-r--r--zenstore/include/zenstore/basicfile.h30
-rw-r--r--zenstore/include/zenstore/caslog.h20
2 files changed, 30 insertions, 20 deletions
diff --git a/zenstore/include/zenstore/basicfile.h b/zenstore/include/zenstore/basicfile.h
new file mode 100644
index 000000000..e3d218a78
--- /dev/null
+++ b/zenstore/include/zenstore/basicfile.h
@@ -0,0 +1,30 @@
+// Copyright Epic Games, Inc. All Rights Reserved.
+
+#pragma once
+
+#include <zencore/zencore.h>
+#include <zencore/iobuffer.h>
+
+#include <zencore/windows.h>
+
+#include <atlfile.h>
+#include <filesystem>
+
+namespace zen {
+
+class CasBlobFile
+{
+public:
+ void Open(std::filesystem::path FileName, bool IsCreate);
+ void Read(void* Data, uint64_t Size, uint64_t Offset);
+ void Write(const void* Data, uint64_t Size, uint64_t Offset);
+ void Flush();
+ uint64_t FileSize();
+ void* Handle() { return m_File; }
+ IoBuffer ReadAll();
+
+private:
+ CAtlFile m_File;
+};
+
+} // namespace zen
diff --git a/zenstore/include/zenstore/caslog.h b/zenstore/include/zenstore/caslog.h
index b318577d7..95282b5fb 100644
--- a/zenstore/include/zenstore/caslog.h
+++ b/zenstore/include/zenstore/caslog.h
@@ -73,24 +73,4 @@ public:
void Open(std::filesystem::path FileName, bool IsCreate) { CasLogFile::Open(FileName, sizeof(T), IsCreate); }
};
-//////////////////////////////////////////////////////////////////////////
-//
-// This should go in its own header
-//
-
-class CasBlobFile
-{
-public:
- void Open(std::filesystem::path FileName, bool IsCreate);
- void Read(void* Data, uint64_t Size, uint64_t Offset);
- void Write(const void* Data, uint64_t Size, uint64_t Offset);
- void Flush();
- uint64_t FileSize();
- void* Handle() { return m_File; }
- IoBuffer ReadAll();
-
-private:
- CAtlFile m_File;
-};
-
} // namespace zen