myxlib/examples/filesystem/01_minimal/minimal.cpp

28 lines
636 B
C++
Raw Normal View History

#include "cmlib_private_config.hpp"
2019-11-25 12:08:34 +00:00
#include <myx/base/config.hpp>
#include <myx/filesystem/paths.hpp>
2019-11-25 12:08:34 +00:00
#include <QCoreApplication>
namespace MF = myx::filesystem;
// Переменные для защиты экземпляра класса MF::Paths
std::atomic< MF::Paths* > MF::Paths::m_instance;
std::mutex MF::Paths::m_mutex;
int main( int argc, char** argv )
{
(void)argc;
(void)argv;
QCoreApplication::setApplicationName( CMLIB_PROJECT_NAME );
MF::Paths* paths = MF::Paths::getInstance();
paths->init( CMLIB_PROJECT_NAME, "conf" );
paths->makeDefaultDirectories();
paths->findConfigFile( "test" );
return( 0 );
}