Added method that returns the available image files

This commit is contained in:
Uwe Seimet 2021-08-04 13:46:35 +02:00
parent feb8809039
commit fc2010413c

View File

@ -35,6 +35,7 @@
#include <string>
#include <sstream>
#include <iostream>
#include <filesystem>
using namespace std;
using namespace spdlog;
@ -469,6 +470,16 @@ void LogDeviceList(const string& device_list)
}
}
set<string> GetAvailableImages() {
set<string> available_images;
for (const auto & entry : filesystem::directory_iterator(default_image_folder)) {
available_images.insert(entry.path());
}
return available_images;
}
//---------------------------------------------------------------------------
//
// Command Processing