diff options
Diffstat (limited to '')
-rw-r--r-- | common.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -12,6 +12,7 @@ #include <QStandardPaths> #include <QFile> #include <QDebug> +#include <QDir> #include "common.h" QString fileNameForDate(QDate date, QString prefix) { @@ -36,3 +37,8 @@ void fileAddRecord(QString sensorPrefix, QString logdata, QDateTime recordTime) out << QString::number(recordTime.currentSecsSinceEpoch()) + ":" + logdata + "\n"; file.close(); } + +void setupFilePath(QString sensorPrefix) { + QSettings settings("asteroid","sensorlogd"); //this should be moved out of here at some point TODO + QDir::root().mkpath(settings.value("loggerRootPath",QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.asteroid-sensorlogd/").toString() + sensorPrefix); +} |