#pragma once #include #include namespace chatterino { class Paths { public: static Paths *instance; Paths(); // Root directory for the configuration files. %APPDATA%/chatterino or // ExecutablePath for portable mode QString rootAppDataDirectory; // Directory for settings files. Same as /Settings QString settingsDirectory; // Directory for message log files. Same as /Misc QString messageLogDirectory; // Directory for miscellaneous files. Same as /Misc QString miscDirectory; // Directory for crashdumps. Same as /Crashes QString crashdumpDirectory; // Hash of QCoreApplication::applicationFilePath() QString applicationFilePathHash; // Profile avatars for Twitch /cache/twitch QString twitchProfileAvatars; // Plugin files live here. /Plugins QString pluginsDirectory; // Custom themes live here. /Themes QString themesDirectory; bool createFolder(const QString &folderPath); bool isPortable(); QString cacheDirectory(); private: void initAppFilePathHash(); void initCheckPortable(); void initRootDirectory(); void initSubDirectories(); boost::optional portable_; // Directory for cache files. Same as /Misc QString cacheDirectory_; }; Paths *getPaths(); } // namespace chatterino