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

Method m_ScanDirForPathSelection

ImGuiFileDialog.cpp:2122–2141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2120}
2121
2122void IGFD::FileManager::m_ScanDirForPathSelection(const FileDialogInternal& vFileDialogInternal, const std::string& vPath) {
2123 std::string path = vPath;
2124
2125 if (!path.empty()) {
2126#ifdef _IGFD_WIN_
2127 if (path == fsRoot) path += IGFD::Utils::GetPathSeparator();
2128#endif // _IGFD_WIN_
2129
2130 ClearPathLists();
2131
2132 const auto& files = m_FileSystemPtr->ScanDirectory(path);
2133 for (const auto& file : files) {
2134 if (file.fileType.isDir()) {
2135 m_AddPath(vFileDialogInternal, path, file.fileNameExt, file.fileType);
2136 }
2137 }
2138
2139 m_SortFields(vFileDialogInternal, m_PathList, m_FilteredPathList);
2140 }
2141}
2142
2143void IGFD::FileManager::m_OpenPathPopup(const FileDialogInternal& vFileDialogInternal, std::vector<std::string>::iterator vPathIter) {
2144 const auto path = ComposeNewPath(vPathIter);

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.80
isDirMethod · 0.80
ScanDirectoryMethod · 0.45

Tested by

no test coverage detected