CS2-Kit
C++23 library for CS2 Metamod:Source plugin development
Loading...
Searching...
No Matches
Paths.cpp
Go to the documentation of this file.
1#include <CS2Kit/Core/Paths.hpp>
2
3namespace CS2Kit::Core
4{
5
6static std::filesystem::path g_baseDir;
7
8void SetBaseDir(const std::filesystem::path& baseDir)
9{
10 g_baseDir = baseDir;
11}
12
13std::filesystem::path ResolvePath(const std::string& relativePath)
14{
15 std::filesystem::path p(relativePath);
16 return p.is_absolute() ? p : g_baseDir / p;
17}
18
19} // namespace CS2Kit::Core
std::filesystem::path ResolvePath(const std::string &relativePath)
Definition Paths.cpp:13
static std::filesystem::path g_baseDir
Definition Paths.cpp:6
void SetBaseDir(const std::filesystem::path &baseDir)
Definition Paths.cpp:8