aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/Asset.cpp
blob: 15ddc27252f08ffc6ff88cef26f0d35a28bb0cfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <filesystem>

#include "Asset.h"

using namespace crepe;

Asset::Asset(const std::string & src) {
	this->src = std::filesystem::canonical(src);
	this->file = std::ifstream(this->src, std::ios::in | std::ios::binary);
}

const std::istream & Asset::read() { return this->file; }

const char * Asset::canonical() { return this->src.c_str(); }