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

#include "Resource.h"

using namespace crepe::api;

Resource::Resource(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 & Resource::read() { return this->file; }

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