mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-20 07:31:27 +00:00
Added method that returns the available image files
This commit is contained in:
parent
feb8809039
commit
fc2010413c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user