eive-obsw/bsp_q7s/fs/helpers.cpp

12 lines
354 B
C++
Raw Normal View History

2022-09-16 11:43:11 +02:00
#include "helpers.h"
std::filesystem::path fshelpers::getPrefixedPath(SdCardManager &man,
2022-09-16 12:14:27 +02:00
std::filesystem::path pathWihtoutPrefix) {
2022-09-16 11:43:11 +02:00
auto prefix = man.getCurrentMountPrefix();
2023-02-22 18:06:34 +01:00
if (prefix == nullptr) {
return pathWihtoutPrefix;
}
2022-09-16 11:43:11 +02:00
auto resPath = prefix / pathWihtoutPrefix;
return resPath;
}