Files
tactility/Tactility/Source/service/ServicePaths.cpp
T
2026-07-03 23:56:03 +02:00

30 lines
848 B
C++

#include <Tactility/service/ServicePaths.h>
#include <Tactility/service/ServiceManifest.h>
#include <Tactility/Paths.h>
#include <cassert>
#include <format>
namespace tt::service {
std::string ServicePaths::getUserDataDirectory() const {
return std::format("{}/service/{}", tt::getUserDataPath(), manifest->id);
}
std::string ServicePaths::getUserDataPath(const std::string& childPath) const {
assert(!childPath.starts_with('/'));
return std::format("{}/{}", getUserDataDirectory(), childPath);
}
std::string ServicePaths::getAssetsDirectory() const {
return std::format("{}/service/{}/assets", tt::getUserDataPath(), manifest->id);
}
std::string ServicePaths::getAssetsPath(const std::string& childPath) const {
assert(!childPath.starts_with('/'));
return std::format("{}/{}", getAssetsDirectory(), childPath);
}
}