sculpto
files_load.cpp
Go to the documentation of this file.
1/*!****************************************************************//*!*
2 * \file files_load.cpp
3 * \brief Assets manager file processing functions implementation module.
4 *
5 * \author Sabitov Kirill
6 * \date 08 July 2022
7 *********************************************************************/
8
9#include "sclpch.h"
10#include "files_load.h"
11
12std::string scl::assets_manager::LoadFile(const std::filesystem::path &FilePath)
13{
14 std::stringstream file_buffer;
15 std::ifstream file(FilePath);
16 SCL_CORE_ASSERT(file.is_open(), "File \"{}\" not found.", FilePath.string());
17
18 file_buffer << file.rdbuf();
19 return file_buffer.str();
20}
#define SCL_CORE_ASSERT(expr,...)
Definition: assert.h:69
std::string LoadFile(const std::filesystem::path &FilePath)
Definition: files_load.cpp:12
Sculpto library prehompiled header. Defines common definitions, includes commonly used modules.