VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
Paths.hpp File Reference
#include <filesystem>
#include <string>
#include <string_view>

Go to the source code of this file.

Namespaces

namespace  VoltMod
 

Functions

void VoltMod::SetBaseDir (const std::filesystem::path &baseDir)
 Set the base directory for path resolution (the host's csgo directory). Must be called during initialization before any file loading.
 
std::filesystem::path VoltMod::ResolvePath (std::string_view relativePath)
 a relative path against the base directory. If the path is already absolute, returns it as-is.
 
std::string VoltMod::PluginDir (std::string_view plugin)
 "addons/voltmod/plugins/<plugin>". Pure string building, so safe at static init.
 
std::string VoltMod::PluginFile (std::string_view plugin, std::string_view relative)
 "addons/voltmod/plugins/<plugin>/<relative>".