#pragma once

#include <fstream>
#include <vector>

#include "utilities/Logger.h"


static std::vector<char> ReadFile(const std::string& FileName)
{
	std::ifstream File(FileName, std::ios::ate | std::ios::binary);

	if (!File.is_open())
	{
		Log::Error("Failed to open file: " + FileName);
	}

	size_t			  FileSize = (size_t)File.tellg();
	std::vector<char> Buffer(FileSize);

	File.seekg(0);
	File.read(Buffer.data(), FileSize);

	File.close();

	return Buffer;
}
