MCPcopy Create free account
hub / github.com/aiekick/ImGuiFileDialog / GetDevices

Method GetDevices

ImGuiFileDialog.cpp:2150–2170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2148}
2149
2150bool IGFD::FileManager::GetDevices() {
2151 const auto devices = m_FileSystemPtr->GetDevicesList();
2152 if (!devices.empty()) {
2153 m_CurrentPath.clear();
2154 m_CurrentPathDecomposition.clear();
2155 ClearFileLists();
2156 for (const auto& drive : devices) {
2157 auto pInfo = FileInfos::create();
2158 pInfo->fileNameExt = drive.first;
2159 pInfo->fileNameExt_optimized = Utils::LowerCaseString(drive.first);
2160 pInfo->deviceInfos = drive.second;
2161 pInfo->fileType.SetContent(FileType::ContentType::Directory);
2162 if (!pInfo->fileNameExt.empty()) {
2163 m_FileList.push_back(pInfo);
2164 showDevices = true;
2165 }
2166 }
2167 return true;
2168 }
2169 return false;
2170}
2171
2172bool IGFD::FileManager::IsComposerEmpty() const {
2173 return m_CurrentPathDecomposition.empty();

Callers 2

EndFrameMethod · 0.80
m_ExploreWithkeysMethod · 0.80

Calls 4

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

Tested by

no test coverage detected