Обновлён алгоритм работы с каталогами

This commit is contained in:
2020-06-03 12:20:59 +03:00
parent 395ffb080a
commit b86cf01973
9 changed files with 240 additions and 231 deletions

View File

@ -1,7 +1,6 @@
#include <myx/base/config.hpp>
#include <myx/filesystem/paths.hpp>
#include <myx/filesystem/paths_mt.hpp>
#include <QCoreApplication>
#include <QDebug>
@ -10,26 +9,18 @@
namespace MF = myx::filesystem;
// Переменные для защиты экземпляра класса MF::PathsMT
std::atomic< MF::PathsMT* > MF::PathsMT::sInstance;
std::mutex MF::PathsMT::sMutex;
int main( int argc, char** argv )
{
(void)argc;
(void)argv;
QCoreApplication::setApplicationName( QStringLiteral( CMLIB_PROJECT_NAME ) );
MF::PathsMT& pathsMT = MF::PathsMT::instance();
MF::Paths& paths = MF::Paths::instance();
pathsMT.init( QStringLiteral( CMLIB_PROJECT_NAME ), QStringLiteral( "conf" ) );
pathsMT.findConfigFile( QStringLiteral( "test" ) );
qDebug() << pathsMT.systemLogDirectory();
qDebug() << pathsMT.systemConfigDirectory();
MF::Paths& paths = MF::Paths::instance();
paths.init( QStringLiteral( CMLIB_PROJECT_NAME ), QStringLiteral( "conf" ) );
qDebug() << "prefixDirectory : " << paths.prefixDirectory();
qDebug() << "executableName : " << paths.executableName();
qDebug() << "executableFilePath : " << paths.executableFilePath();
qDebug() << "executableDirectory : " << paths.executableDirectory();