MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / GetDevices

Method GetDevices

external/ImGuiFileDialog/ImGuiFileDialog.cpp:2212–2232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2210}
2211
2212bool IGFD::FileManager::GetDevices() {
2213 const auto devices = m_FileSystemPtr->GetDevicesList();
2214 if (!devices.empty()) {
2215 m_CurrentPath.clear();
2216 m_CurrentPathDecomposition.clear();
2217 ClearFileLists();
2218 for (const auto& drive : devices) {
2219 auto pInfo = FileInfos::create();
2220 pInfo->fileNameExt = drive.first;
2221 pInfo->fileNameExt_optimized = Utils::LowerCaseString(drive.first);
2222 pInfo->deviceInfos = drive.second;
2223 pInfo->fileType.SetContent(FileType::ContentType::Directory);
2224 if (!pInfo->fileNameExt.empty()) {
2225 m_FileList.push_back(pInfo);
2226 showDevices = true;
2227 }
2228 }
2229 return true;
2230 }
2231 return false;
2232}
2233
2234bool IGFD::FileManager::IsComposerEmpty() const {
2235 return m_CurrentPathDecomposition.empty();

Callers 2

EndFrameMethod · 0.80
m_ExploreWithkeysMethod · 0.80

Calls 5

GetDevicesListMethod · 0.80
SetContentMethod · 0.80
emptyMethod · 0.45
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected