| 2095 | } |
| 2096 | |
| 2097 | void IGFD::FileManager::ScanDir(const FileDialogInternal& vFileDialogInternal, const std::string& vPath) { |
| 2098 | std::string path = vPath; |
| 2099 | |
| 2100 | if (m_CurrentPathDecomposition.empty()) { |
| 2101 | SetCurrentDir(path); |
| 2102 | } |
| 2103 | |
| 2104 | if (!m_CurrentPathDecomposition.empty()) { |
| 2105 | #ifdef _IGFD_WIN_ |
| 2106 | if (path == fsRoot) { |
| 2107 | path += IGFD::Utils::GetPathSeparator(); |
| 2108 | } |
| 2109 | #endif // _IGFD_WIN_ |
| 2110 | |
| 2111 | ClearFileLists(); |
| 2112 | |
| 2113 | const auto& files = m_FileSystemPtr->ScanDirectory(path); |
| 2114 | for (const auto& file : files) { |
| 2115 | m_AddFile(vFileDialogInternal, path, file.fileNameExt, file.fileType); |
| 2116 | } |
| 2117 | |
| 2118 | m_SortFields(vFileDialogInternal, m_FileList, m_FilteredFileList); |
| 2119 | } |
| 2120 | } |
| 2121 | |
| 2122 | void IGFD::FileManager::m_ScanDirForPathSelection(const FileDialogInternal& vFileDialogInternal, const std::string& vPath) { |
| 2123 | std::string path = vPath; |
no test coverage detected