| 2157 | } |
| 2158 | |
| 2159 | void 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 | |
| 2184 | void IGFD::FileManager::m_ScanDirForPathSelection(const FileDialogInternal& vFileDialogInternal, const std::string& vPath) { |
| 2185 | std::string path = vPath; |
no test coverage detected