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

Method ScanDir

external/ImGuiFileDialog/ImGuiFileDialog.cpp:2159–2182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2157}
2158
2159void IGFD::FileManager::ScanDir(const FileDialogInternal& vFileDialogInternal, const std::string& vPath) {
2160 std::string path = vPath;
2161
2162 if (m_CurrentPathDecomposition.empty()) {
2163 SetCurrentDir(path);
2164 }
2165
2166 if (!m_CurrentPathDecomposition.empty()) {
2167#ifdef _IGFD_WIN_
2168 if (path == fsRoot) {
2169 path += IGFD::Utils::GetPathSeparator();
2170 }
2171#endif // _IGFD_WIN_
2172
2173 ClearFileLists();
2174
2175 const auto& files = m_FileSystemPtr->ScanDirectory(path);
2176 for (const auto& file : files) {
2177 m_AddFile(vFileDialogInternal, path, file.fileNameExt, file.fileType);
2178 }
2179
2180 m_SortFields(vFileDialogInternal, m_FileList, m_FilteredFileList);
2181 }
2182}
2183
2184void IGFD::FileManager::m_ScanDirForPathSelection(const FileDialogInternal& vFileDialogInternal, const std::string& vPath) {
2185 std::string path = vPath;

Callers 1

DisplayMethod · 0.80

Calls 2

ScanDirectoryMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected