eive-obsw/mission/utility/Filenaming.cpp

18 lines
452 B
C++
Raw Normal View History

2022-04-13 11:56:37 +02:00
#include "Filenaming.h"
2022-04-30 16:21:59 +02:00
2022-04-13 11:56:37 +02:00
#include "Timestamp.h"
2022-04-30 16:21:59 +02:00
Filenaming::Filenaming() {}
2022-04-13 11:56:37 +02:00
2022-04-14 07:52:21 +02:00
std::string Filenaming::generateAbsoluteFilename(std::string path, std::string filename,
2022-04-30 16:21:59 +02:00
bool addTimestamp) {
2022-04-13 11:56:37 +02:00
std::string absoluteName;
Timestamp timestamp;
if (addTimestamp) {
absoluteName = path + "/" + timestamp.str() + filename;
} else {
absoluteName = path + "/" + filename;
}
return absoluteName;
}