Core/File: Add ReadWhole

This commit is contained in:
Lynix
2022-05-08 15:50:29 +02:00
parent 3c8b4c2587
commit 5f389ef0a4
3 changed files with 25 additions and 17 deletions

View File

@@ -15,6 +15,7 @@
#include <ctime>
#include <filesystem>
#include <fstream>
#include <optional>
namespace Nz
{
@@ -55,6 +56,7 @@ namespace Nz
static inline ByteArray ComputeHash(HashType hash, const std::filesystem::path& filePath);
static inline ByteArray ComputeHash(AbstractHash& hash, const std::filesystem::path& filePath);
static std::optional<std::vector<UInt8>> ReadWhole(const std::filesystem::path& path);
private:
void FlushStream() override;