core/log: add filesystem logger

This commit is contained in:
outfoxxed 2024-08-02 21:37:52 -07:00
parent 46f48f2f87
commit 6bf4826ae7
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
9 changed files with 299 additions and 53 deletions

27
src/core/paths.hpp Normal file
View file

@ -0,0 +1,27 @@
#pragma once
#include <qdir.h>
class QsPaths {
public:
static QsPaths* instance();
static void init(QString shellId);
QDir* cacheDir();
QDir* runDir();
QDir* instanceRunDir();
private:
enum class DirState {
Unknown = 0,
Ready = 1,
Failed = 2,
};
QString shellId;
QDir mCacheDir;
QDir mRunDir;
QDir mInstanceRunDir;
DirState cacheState = DirState::Unknown;
DirState runState = DirState::Unknown;
DirState instanceRunState = DirState::Unknown;
};