diff options
Diffstat (limited to 'lib/resource.cpp')
-rw-r--r-- | lib/resource.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/resource.cpp b/lib/resource.cpp new file mode 100644 index 0000000..b9aa4fa --- /dev/null +++ b/lib/resource.cpp @@ -0,0 +1,16 @@ +#include "resource.h" +#include <utility> + +std::filesystem::path base {std::filesystem::current_path() / "res"}; + +void +Resource::setBasePath(std::filesystem::path newbase) +{ + base = std::move(newbase); +} + +std::filesystem::path +Resource::mapPath(const std::filesystem::path & rel) +{ + return std::filesystem::canonical(base / rel); +} |