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

#include "Asset.h"

using namespace crepe::api;

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(); }