код:
boost::filesystem::path config_folder(Config::CONFIG_FOLDER_NAME);
if( !(boost::filesystem::exists(config_folder)))
{
std::cout << "Network Config Directory not found...\n";
std::cout << "Creating folder called " << Config::CONFIG_FOLDER_NAME << "\n";
boost::filesystem::create_directory(config_folder);
}
if( !(boost::filesystem::exists(boost::format("%s/%s") % config_folder % Config::fmap[Config::current_hash_function]));
{
std::cout << "This hash has not been configure before...\n";
std::cout << "Creating folder called " << Config::fmap[Config::current_hash_function] << "\n";
boost::filesystem::create_directory(boost::format("%s/%s") % config_folder % Config::fmap[Config::current_hash_function]);
}
Итак, сначала, если папка конфигурации не существует, создайте ее. (эта часть работает) Затем проверьте, существует ли папка current_hash_function, если нет ... создайте ее. (эта часть не работает)
Я получаю ошибку;
src/neural_networks/shared.cpp:41: error: no matching function for call to ‘exists(boost::basic_format<char, std::char_traits<char>, std::allocator<char> >&)’
причина, по которой я использовал формат повышения в проверке fs: exists, заключается в том, что я не знаю, как создать путь на 2 уровня глубиной